Hi!
The problem is at compile-time, attached is a small module which exhibits this behaviour. My system is Red Hat Linux release 5.2 (Apollo) running kernel 2.0.36 on an i586. I've built gcc-2.8.1 and gpc 19990118.
gpc -v gives the following output
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/specs gpc version 19990118, based on gcc-2.8.1
Thanks for the detailed information. :-)
Below is a version of your test program that is ready for our test suite.
To work around the bug, you can drop the first `protected'.
BTW, here are some off-topic remarks:
* In this example we are mixing Extended Pascal modules with UCSD (Borland) Pascal units. EP wants `import' instead of `uses'.
* `MoveLeft' is also an UCSD extension not present in EP.
* `SetLength' is a GPC/Delphi extension.
While GPC accepts all this, it is maybe better to stick to one flavour of modularized Pascal programming which means either EP-style modules or UCSD-style unit, but not a mixture. Furthermore if I would write an EP-style module at all, I would not use non-EP extensions. But it's a matter of taste, of course.
Thanks for the well-written bug report,
Peter