Hi,
I still can't seem to be able to build gpc for HP-UX 10.20. I tried all three available versions 19990118, 19990409, 19990607 and for each I get the same error:
../../xgpc -B../../ -c -I. -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -O2 -g -O2 -DBSD_RTS=0 `if [ x@with_shared@ = xyes ] ; then echo -fPIC; fi` --unit-path=/ece2/eeof/egcs-1.1.2/gcc/p/rts --automake /ece2/eeof/egcs-1.1.2/gcc/p/rts/files.pas /ece2/eeof/egcs-1.1.2/gcc/p/rts/files.pas: In function `Ioselect': /ece2/eeof/egcs-1.1.2/gcc/p/rts/files.pas:162: internal error--unrecognizable insn: (insn 288 285 290 (set (zero_extract:SI (reg:SI 223) (const_int 32) (const_int 0)) (reg:SI 222)) -1 (insn_list 285 (insn_list 287 (nil))) (expr_list:REG_DEAD (reg:SI 222) (nil))) ../../../egcs-1.1.2/gcc/p/../toplev.c:1385: Internal compiler error in function fatal_insn make[3]: *** [files.o] Error 1 make[3]: Leaving directory `/ece2/eeof/gcc/gcc/p/rts' make[2]: *** [pascal.rts] Error 2 make[2]: Leaving directory `/ece2/eeof/gcc/gcc' make[1]: *** [bootstrap] Error 2 make[1]: Leaving directory `/ece2/eeof/gcc/gcc' make: *** [bootstrap] Error 2
Anyone else had this problem? Is it a known limitation? (I'm not saying bug...)
Has anyone successfully built gpc on HP-UX?
Please cc me,
Thanks,
Dimitrios.
Dimitrios Bartzos wrote:
[...] /ece2/eeof/egcs-1.1.2/gcc/p/rts/files.pas:162: internal error--unrecognizable insn: (insn 288 285 290 (set (zero_extract:SI (reg:SI 223) (const_int 32) (const_int 0)) (reg:SI 222)) -1 (insn_list 285 (insn_list 287 (nil))) (expr_list:REG_DEAD (reg:SI 222) (nil))) ../../../egcs-1.1.2/gcc/p/../toplev.c:1385: Internal compiler error in function fatal_insn
For me, this looks like an internal error in the backend. This makes it hard to debug ... :-(
Maybe the error is related to egcs-1.1.2? Did you try gcc-2.8.x? (There will also be gcc-2.95, soon.)
Debugging gpc1 while it issues these error messages is possible, but some work. `cd' to the `.../p/rts/' directory, run `gdb ../../gpc1', type `set args -fautomake files.pas' (plus maybe other necessary options to `gpc1' that appear in the Makefile). Then `run' the compiler. When the error occurs, type `info stack' and show us the result. After that we will see ... :-]
Has anyone successfully built gpc on HP-UX?
Someone has successfully done this in the past, but I do not remember who ...
Hope this helps
Peter
For me, this looks like an internal error in the backend. This makes it hard to debug ... :-(
Maybe the error is related to egcs-1.1.2? Did you try gcc-2.8.x? (There will also be gcc-2.95, soon.)
Well, I have been able to build and run egcs-1.1.2 without gpc with no problems, so if it were a backend problem it should have to do with gpc at least partly (or the way gpc uses the backend).
Debugging gpc1 while it issues these error messages is possible, but some work. `cd' to the `.../p/rts/' directory, run `gdb ../../gpc1', type `set args -fautomake files.pas' (plus maybe other necessary options to `gpc1' that appear in the Makefile). Then `run' the compiler. When the error occurs, type `info stack' and show us the result. After that we will see ... :-]
I just tried that and got this:
(gdb) run Starting program: /ece2/eeof/gcc/gcc/gpc1 -fautomake files.pas [New process 13605] Detaching after fork from process 13605 gpc1: installation problem, cannot exec `gpc': No such file or directory gpc1: gpc exited with status 255 [New process 13606] Detaching after fork from process 13606 gpc1: installation problem, cannot exec `gpc': No such file or directory gpc1: gpc exited with status 255 Assign Internal_assign Assign_cfile Ioselect files.pas: In function `Ioselect': files.pas:162: internal error--unrecognizable insn: (insn 353 352 355 (set (zero_extract:SI (reg:SI 241) (const_int 32) (const_int 0)) (reg:SI 242)) -1 (nil) (nil)) ../../../egcs-1.1.2/gcc/p/../toplev.c:1385: Internal compiler error in function fatal_insn
Program exited with code 041. (gdb) info stack No stack.
---------
I also tried loading xgpc int gdb (which is the executable called in the Makefile -and I guess it calls gpc1?):
Starting program: /ece2/eeof/gcc/gcc/xgpc -fautomake files.pas [New process 13613] Detaching after fork from process 13613 [New process 13614] Detaching after fork from process 13614 files.pas: In function `Ioselect': files.pas:162: internal error--unrecognizable insn: (insn 353 352 355 (set (zero_extract:SI (reg:SI 241) (const_int 32) (const_int 0)) (reg:SI 242)) -1 (nil) (nil)) ../../../egcs-1.1.2/gcc/p/../toplev.c:1385: Internal compiler error in function fatal_insn
Program exited with code 01. (gdb) info stack No stack.
Is there something I should have setup before I do the 'info stack'? I am not familiar with debugging.
Thanks again,
Dimitrios.
PS. Should I stop cc-ing to the list?
Dimitrios Bartzos wrote:
(gdb) run [...] ../../../egcs-1.1.2/gcc/p/../toplev.c:1385: Internal compiler error in function fatal_insn
Program exited with code 041. [...]
Is there something I should have setup before I do the 'info stack'?
There should be a breakpoint on the "fatal error" function. Please retry and copy the `.gdbinit' file from the GPC source directory to the directory where you are running the `gdb' session.
PS. Should I stop cc-ing to the list?
IMHO, we should continue to CC to the list. I still hope that someone with more knowledge about HP-UX than I have can jump in after we have produced some inspiring facts. ;-)
Peter
On Sat, 14 Aug 1999, Peter Gerwinski wrote:
Dimitrios Bartzos wrote:
(gdb) run [...] ../../../egcs-1.1.2/gcc/p/../toplev.c:1385: Internal compiler error in function fatal_insn
Program exited with code 041. [...]
Is there something I should have setup before I do the 'info stack'?
There should be a breakpoint on the "fatal error" function. Please retry and copy the `.gdbinit' file from the GPC source directory to the directory where you are running the `gdb' session.
Ok, I copied .gdbinit in the p/rts directory and run gdb on gpc1 with the file files.pas
Here's the output:
Breakpoint 1 at 0x1937d4: file ../../../egcs-1.1.2/gcc/p/../toplev.c, line 2139. Breakpoint 2 at 0x193230: file ../../../egcs-1.1.2/gcc/p/../toplev.c, line 1774. Breakpoint 3 (deferred) at "abort" ("abort" was not found). Breakpoint deferred until a shared library containing "abort" is loaded. (gdb) run files.pas Starting program: /ece2/eeof/gcc/gcc/gpc1 files.pas [New process 18403] Detaching after fork from process 18403 gpc1: installation problem, cannot exec `gpc': No such file or directory gpc1: gpc exited with status 255 [New process 18404] Detaching after fork from process 18404 gpc1: installation problem, cannot exec `gpc': No such file or directory gpc1: gpc exited with status 255 Assign Internal_assign Assign_cfile Ioselect Breakpoint 2, error (s=0x1fd30 "internal error--unrecognizable insn:") at ../../../egcs-1.1.2/gcc/p/../toplev.c:1774 1774 verror (s, ap); (gdb) info stack #0 error (s=0x1fd30 "internal error--unrecognizable insn:") at ../../../egcs-1.1.2/gcc/p/../toplev.c:1774 #1 0x192878 in fatal_insn ( message=0x1fd30 "internal error--unrecognizable insn:", insn=0x4007c030) at ../../../egcs-1.1.2/gcc/p/../toplev.c:1375 #2 0x192948 in fatal_insn_not_found (insn=0x4007c030) at ../../../egcs-1.1.2/gcc/p/../toplev.c:1399 #3 0x1324ec in insn_extract (insn=0x1fd30) at insn-extract.c:25 Error accessing memory address 0x0: Invalid argument.
I hope this helps crarify things a little more,
Dimitrios.