Waldek Hebisch wrote:
Adriaan van Os wrote:
Waldek Hebisch wrote:
BTW: if the same happens with standalone program (without modules) I should be able to reproduce it.
Sorry, not clear to me what you mean.
I have build a cross-compiler targetting Mac OSX. However, I do not have the complete toolchain (only bare compiler). Without full toolchain I can not compile RTS (the problem really is configure) and also I can not compile anything using GPC module.
If you have a testcase which does not use GPC module (directy or indirectly) I should be able to compile it. In fact, if a program uses no extra modules (units) at all debugging becomes easier.
I have tried the cross-compiler on various test programs and ATM it happily produced stabs debug info.
OK, I understand, I will look for a testcase (or try to isolate the problem).
I have noticed a problem, namely on `emil3.pas' at -O0 I get ice:
../gpc-4-osx/gcc/xgpc -B../gpc-4-osx/gcc -static -S emil3.pas
main program emil3.pas: In main program:
emil3.pas:12: error: unrecognizable insn: (insn 28 27 29 1 (set (reg:DF 142 [ D.587 ]) (subreg:DF (mem/i:DC (lo_sum:SI (reg/f:SI 155) (symbol_ref:SI ("C") [flags 0x182] <var_decl 0x2a9594cdd0 C>)) [0 C+0 S16 A64]) 0)) -1 (nil) (expr_list:REG_DEAD (reg/f:SI 155) (nil))) emil3.pas:12: internal compiler error: in extract_insn, at recog.c:2020 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions.
This ICE goes away with -fPIC or -mdynamic-no-pic (also any optimization option or -m64 helps). I see this ICE both with 4.0 and 3.4.6 backend.
Yes, fully reproducable, also with older snapshots and back-ends, e.g.
[G5:gcc/p/test] adriaan% gpc332d1 emil3.pas --no-pic emil3.pas: In main program: emil3.pas:12: error: unrecognizable insn: (insn 23 22 24 0 0x0 (set (reg:DF 126) (subreg:DF (mem/f:DC (lo_sum:SI (reg/f:SI 124) (symbol_ref:SI ("!D__C"))) [0 C+0 S16 A64]) 0)) -1 (nil) (expr_list:REG_DEAD (reg/f:SI 124) (nil))) emil3.pas:12: internal compiler error: in extract_insn, at recog.c:2175
[G5:gcc/p/test] adriaan% gpc332d1 -v Reading specs from /Developer/Pascal/gpc332d1/lib/gcc-lib/powerpc-apple-darwin/3.3.2/specs Configured with: ../gpc-332d1/configure --enable-languages=pascal,c --prefix=/Developer/Pascal/gpc332d1 --enable-threads=posix --target=powerpc-apple-darwin Thread model: posix gpc version 20030830, based on gcc-3.3.2
Regards,
Adriaan van Os