cc1plus (sjlj eh) bootstrap hangs in sched.c

Robert Lipe robertlipe@usa.net
Mon Apr 19 01:30:00 GMT 1999


i686-pc-sco3.2v5.0.5

During bootstrap, a naughty thing happens when we build the C++ parts of
libgcc.a.  We just seem to hang.  I finally got a chance to stick the
hang in a debugger.  Sure enough, we are spinning...

make bootstrap3
[ munch ] 
./xgcc -B./ -B/usr/local/i686-pc-sco3.2v5.0.5/bin/ -O2   -DIN_GCC     -W -Wall -O2 -g  -I./include   -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -mcoff  -I. -I../../egcs/gcc -I../../egcs/gcc/config -I../../egcs/gcc/../include \
  -c ../../egcs/gcc/cp/new1.cc -DL_op_newnt -o opnewnt.o


If I remove -mcoff, the problem goes away.   If I let it build ELF but
force -fsjlj-exceptions, the problem comes back.  So the problem seems
to be triggered by sjlj.


 robertl 21259 21257 80 03:09:53       ?    00:05:50 ./cc1plus /usr/tmp/cc1Gfaaa.ii -quiet -dumpbase new1.cc -mcoff -g -g1 -O2 -O2 -

(gdb) where
#0  schedule_block (b=1, file=0x0) at ../../egcs/gcc/sched.c:3477
#1  0x8138982 in schedule_insns (dump_file=0x0) at ../../egcs/gcc/sched.c:4335
#2  0x804cd81 in rest_of_compilation (decl=0x8299658)
    at ../../egcs/gcc/toplev.c:4230
#3  0x8194d90 in finish_function (lineno=66, flags=136973240, nested=0)
    at ../../../egcs/gcc/cp/decl.c:14239
#4  0x81c0797 in yyparse () at ../../../egcs/gcc/cp/parse.c:648
#5  0x804b129 in compile_file (name=0x804792a "/usr/tmp/cc1Gfaaa.ii")
    at ../../egcs/gcc/toplev.c:3045
#6  0x804e647 in main (argc=14, argv=0x8047820) at ../../egcs/gcc/toplev.c:5384
#7  0x804914b in .text ()


(gdb) n
3477            if (GET_CODE (line) == NOTE && NOTE_LINE_NUMBER (line) > 0)
(gdb) 
3477            if (GET_CODE (line) == NOTE && NOTE_LINE_NUMBER (line) > 0)
(gdb) 
3477            if (GET_CODE (line) == NOTE && NOTE_LINE_NUMBER (line) > 0)
(gdb) 
3477            if (GET_CODE (line) == NOTE && NOTE_LINE_NUMBER (line) > 0)
(gdb) 
(gdb) list
3482          for (insn = head; insn != next_tail; insn = NEXT_INSN (insn))
3483            if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) > 0)
3484              line = insn;
3485          /* This used to emit line number notes before every non-deleted note.
3486             However, this confuses a debugger, because line notes not separated
3487             by real instructions all end up at the same address.  I can find no
3488             use for line number notes before other notes, so none are emitted.  */
3489            else if (GET_CODE (insn) != NOTE
3490                     && (note = LINE_NOTE (insn)) != 0
3491                     && note != line
(gdb) print *head
$5 = {code = NOTE, mode = VOIDmode, jump = 0, call = 0, unchanging = 0, 
  volatil = 0, in_struct = 0, used = 0, integrated = 0, frame_related = 0, 
  fld = {{rtwint = 711, rtint = 711, rtstr = 0x2c7 "", rtx = 0x2c7, 
      rtvec = 0x2c7, rttype = 711, rt_addr_diff_vec_flags = {min_align = 199, 
        base_after_vec = 0, min_after_vec = 1, max_after_vec = 0, 
        min_after_base = 0, max_after_base = 0, offset_unsigned = 0, 
        scale = 0}, rtbit = 0x2c7, rttree = 0x2c7, bb = 0x2c7}}}
(gdb) print *line
$6 = {code = NOTE, mode = VOIDmode, jump = 0, call = 0, unchanging = 0, 
  volatil = 0, in_struct = 0, used = 0, integrated = 0, frame_related = 0, 
  fld = {{rtwint = 562, rtint = 562, rtstr = 0x232 "", rtx = 0x232, 
      rtvec = 0x232, rttype = 562, rt_addr_diff_vec_flags = {min_align = 50, 
        base_after_vec = 0, min_after_vec = 1, max_after_vec = 0, 
        min_after_base = 0, max_after_base = 0, offset_unsigned = 0, 
        scale = 0}, rtbit = 0x232, rttree = 0x232, bb = 0x232}}}
(gdb) print *insn
$7 = {code = CALL_INSN, mode = VOIDmode, jump = 0, call = 0, unchanging = 1, 
  volatil = 0, in_struct = 0, used = 0, integrated = 0, frame_related = 0, 
  fld = {{rtwint = 554, rtint = 554, rtstr = 0x22a "", rtx = 0x22a, 
      rtvec = 0x22a, rttype = 554, rt_addr_diff_vec_flags = {min_align = 42, 
        base_after_vec = 0, min_after_vec = 1, max_after_vec = 0, 
        min_after_base = 0, max_after_base = 0, offset_unsigned = 0, 
        scale = 0}, rtbit = 0x22a, rttree = 0x22a, bb = 0x22a}}}



More information about the Gcc-bugs mailing list