Hello,
I have tried to execute the simple program
PROGRAM test(input, output);
TYPE s(a,b:integer) = ARRAY[a..b] OF real;
VAR x:s(5,6); i:integer;
BEGIN writeln(x.a:3,x.b:3); END.
It should write "5 6" on the output. At a HP system it writes "0 0".
I am sorry but i am using a rather old version of gpc: version 19980830, based on gcc-egcs-2.91.57 19980901 (egcs-1.1 release) on a HP-system: HP-UX rug102 B.10.20 A 9000/735 2011278599
The Linux implementation, which I have also checked, does not suffer from this bug. I have not found this bug in neither the list of known bugs nor the list of fixed bugs.
With kind regards,
Rudy Moddemeijer
--------------------------------------------------------------------- | R. Moddemeijer | Department of Computing Science | | | University of Groningen | | Phone +31/50 - 363 3940 | Blauwborgje 3 room IWI 228 | | Telefax +31/50 - 363 3800 | P.O. Box 800 | | e-Mail rudy@cs.rug.nl | NL-9700 AV Groningen | | r.moddemeijer@cs.rug.nl | The Netherlands | | | | ---------------------------------------------------------------------
On Fri, 20 Oct 2000, Rudy Moddemeyer wrote:
Hello,
I have tried to execute the simple program
PROGRAM test(input, output);
TYPE s(a,b:integer) = ARRAY[a..b] OF real;
VAR x:s(5,6); i:integer;
BEGIN writeln(x.a:3,x.b:3); END.
It should write "5 6" on the output. At a HP system it writes "0 0".
I am sorry but i am using a rather old version of gpc: version 19980830, based on gcc-egcs-2.91.57 19980901 (egcs-1.1 release)
Think the problem is that version is just too old. If you want a gpc that's not cutting edge but works fairly well upgrade to the 19991030 release. If you don't have the gcc source you might as well go the whole distance and get a recient gpc release and gcc-2.95.2 source.
You can get the gpc source from ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/alpha/
hope this helps Russ