This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

more details on powerpc bootstrap failure, and possible solution


I went through all of the recent snapshots today; everything up to 0921
is fine, but the 1005 snapshot (and current for at least two or three
days before that) dies in stage2 on regmove.c.

The build commands:
mkdir builddir; cd builddir; ../configure --enable-shared \
 --enable-threads --prefix=/usr powerpc-linux -v; \
 make bootstrap
(Same results with just ../configure).

The error:
stage1/xgcc -Bstage1/ -c  -DIN_GCC    -W -Wall -O2 -g -O2
-DHAVE_CONFIG_H -DHAIFA    -I. -I../../gcc -I../../gcc/config
-I../../gcc/../include ../../gcc/regmove.c
xgcc: Internal compiler error: program cc1 got fatal signal 11
make[2]: *** [regmove.o] Error 1
make[2]: Leaving directory /reroot/egcs/egcs-ss/egcs/builddir/gcc'
make[1]: *** [bootstrap] Error 2

And at last, the backtrace:

(gdb) file stage1/cc1
Reading symbols from stage1/cc1...done.
(gdb) bt
#0  0x18dc8e4 in reg_mentioned_p (reg=0x0, in=0x1dffb48) at
../../gcc/rtlanal.c:274
#1  0x19dd0f4 in find_reloads (insn=0x1dffcf8, replace=0, ind_levels=0,
live_known=1,
    reload_reg_p=0x1b66840) at ../../gcc/reload.c:4099
    #2  0x19e8f4c in calculate_needs_all_insns (first=0x1db5e70,
global=1) at ../../gcc/reload1.c:1314
#3  0x19e7f3c in reload (first=0x1db5e70, global=1, dumpfile=0x0) at
../../gcc/reload1.c:964
#4  0x19c3edc in global_alloc (file=0x0) at ../../gcc/global.c:576
#5  0x183d91c in rest_of_compilation (decl=0x1cec310) at
../../gcc/toplev.c:3749
#6  0x181c22c in finish_function (nested=0) at ../../gcc/c-decl.c:7181
#7  0x1801c14 in yyparse () at c-parse.y:313
#8  0x183af5c in compile_file (name=0x7fffec17 "/tmp/cc9qR2N5.i") at
../../gcc/toplev.c:2788
#9  0x18402fc in main (argc=12, argv=0x7fffe9f4) at
../../gcc/toplev.c:4862
#10 0x16da86c in ?? () from /lib/libc.so.6




As suggested by the above, find_reloads was at fault.  The bug went
away when I reverted to revision 1.43.  I am willing to bet that this
is the chunk at fault, with reload_in[i] being 0x0.

+               for (j = n_reloads - 1; j > first_num; j--)
+                 {
+                   if (reload_when_needed[j] == type
+                       && reg_mentioned_p (reload_in[i], reload_in[j]))
+                     {
+                       reload_when_needed[i] = type;
+                       break;
+                     }
+                 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]