According to igor@merlot.stat.uconn.edu:
I don't know if this is really a bug but I didn't find an FAQ with
my answer and I haven't found a place to post this except to send it to you.
This list is the correct place.
I installed gpc-2.0 with gcc-2.7.2.3 (I just switched the GCCVERSION
variable in Makefile.in). I runed the configure with my machine arch and used the --with-gccsrc, --with-gccbin, --prefix, --exec-prefix flags. Somehow the --prefix didn't pass to the Makefile so I edited the Makefile switching gcc_prefix to the correct place on my machine (I didn't touch gcc_local_prefix).
Just to ensure that we are not suffering from something trivial: GPC v2.0 derives its configuration from that of GCC and merely ignores (?) switches given to `configure'. Thus the problem might be that you gave these switches to GPC's `configure' instead of GCC's one. (* I am not sure about all this ... *)
After typing make, the program is build without any warnings or
errors.
Sounds as if nothing has gone wrong with this.
So I tried some test programs and I looked in the standard_pascal
directory. I compiled hello.pas using gpc (gpc hello.pas) and also tried linking with gcc (gpc -c hello.pas, gcc -o hello hello.o -lm -lgpc). AS "hello world" wouldn't print out, I added the -g flag and tried to look at it through a debugger. What I got is this:
(dbx) s stopped in program_Hello at line 4 in file "hello.pas" 4 writeln('Hello, world!'); (dbx) s internal error: unexpected value 120 at line 3851 in file stabstring.c internal error: expected char ',', found 's__LC_locale:,768,32;__meth_ptr:9,800,32;__data_ptr:9,832,32;;'
Looks like a plain bug in GPC's generation of DBX debugging information.
First, you should upgrade to the most recent beta, gpc-971001, available from ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/. Maybe this already fixes the bug; if not, you can help us to find the bug as follows:
Please make sure that your GCC compiles `hello.c' and generates correct DBX debugging information. Then compile `hello.pas' and `hello.c' with the options `-g -S', compare both generated versions of `hello.s', and post your results to this list. I expect some tiny differences in otherwise equivalent `.stabs' lines.
Good luck and thanks for your cooperation,
Peter -- Peter Gerwinski, Essen, Germany, free physicist and programmer Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - 1 Oct 1997 PGP key fingerprint: AC 6C 94 45 BE 28 A4 96 0E CC E9 12 47 25 82 75 Fight the SPAM! - http://maps.vix.com/