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]

Bootstrap fail on powerpc-linux in cse_basic_block (also fancy_abort still doesn't work right)


Hi,

on powerpc-linux-gnu boostrap fails during stage2 with RTL checking enabled 
like that:

Starting program: /home/fsirl/obj/gccm/gcc/stage1/cc1 -fpreprocessed 
mkdeps.i -quiet -dumpbase mkdeps.c -g -O2 -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wtraditional -Wno-long-long 
-pedantic -version -o mkdeps.s
GNU CPP version 2.97 20010219 (experimental) (cpplib) (PowerPC GNU/Linux)
GNU C version 2.97 20010219 (experimental) (ppc-redhat-linux)
         compiled by GNU C version 2.95.3 20010111 
(prerelease/franzo/20010111).
/home/fsirl/cvsx/gccm/gcc/mkdeps.c: In function `deps_add_default_target':
/home/fsirl/cvsx/gccm/gcc/mkdeps.c:207: RTL check: expected elt 0 type 'i' 
or 'n', have 'e' (rtx plus)

Breakpoint 2, fancy_abort (file=0x10ad3450 
"/home/fsirl/cvsx/gccm/gcc/cse.c", line=7334, function=0x10ad4044 
"cse_basic_block")
     at /home/fsirl/cvsx/gccm/gcc/diagnostic.c:1767
1767      internal_error ("Internal compiler error in %s, at %s:%d",
(gdb) bt
#0  fancy_abort (file=0x10ad3450 "/home/fsirl/cvsx/gccm/gcc/cse.c", 
line=7334, function=0x10ad4044 "cse_basic_block")
     at /home/fsirl/cvsx/gccm/gcc/diagnostic.c:1767
#1  0x1021da20 in rtl_check_failed_type2 (r=0x30237f90, n=0, c1=105, 
c2=110, file=0x10ad3450 "/home/fsirl/cvsx/gccm/gcc/cse.c", line=7334,
     func=0x10ad4044 "cse_basic_block") at /home/fsirl/cvsx/gccm/gcc/rtl.c:1320
#2  0x1037ecc8 in cse_basic_block (from=0x30235dc0, to=0x3020bec0, 
next_branch=0x7ffff0dc, around_loop=1)
     at /home/fsirl/cvsx/gccm/gcc/cse.c:7334
#3  0x1037e024 in cse_main (f=0x30218c20, nregs=223, after_loop=0, 
file=0x0) at /home/fsirl/cvsx/gccm/gcc/cse.c:7196
#4  0x1008ead8 in rest_of_compilation (decl=0x301ec750) at 
/home/fsirl/cvsx/gccm/gcc/toplev.c:3005
#5  0x1002c39c in c_expand_body (fndecl=0x301ec750, nested_p=0) at 
/home/fsirl/cvsx/gccm/gcc/c-decl.c:6738
#6  0x1002bf74 in finish_function (nested=0) at 
/home/fsirl/cvsx/gccm/gcc/c-decl.c:6659
#7  0x100024a0 in yyparse_1 () at c-parse.y:323
#8  0x1000ae0c in yyparse () at /home/fsirl/cvsx/gccm/gcc/c-lex.c:157
#9  0x1008cec8 in compile_file (name=0x10b8843f "mkdeps.i") at 
/home/fsirl/cvsx/gccm/gcc/toplev.c:2354
#10 0x10092dd8 in main (argc=19, argv=0x7ffff8ec) at 
/home/fsirl/cvsx/gccm/gcc/toplev.c:4937
#11 0xff0b734 in __libc_start_main (argc=19, argv=0x7ffff8ec, 
envp=0x7ffff93c, auxvec=0x7ffff9c4, rtld_fini=0x10ad3450 <xspaces+42104>,
     stinfo=0x10a9cfa0, stack_on_entry=0x7fffef90) at 
../sysdeps/powerpc/elf/libc-start.c:106
(gdb)

Note that I had to enter the debugger here, because 
fancy_abort/internal_error no longer prints function and line where the RTL 
check happened, even though it is called with the right parameters :-(, but 
errorcount is 1... Actually a fancy_rtl_abort printing the RTL would be 
nice for the RTL checking.

More data:
(gdb) up
#2  0x1037ecc8 in cse_basic_block (from=0x30235dc0, to=0x3020bec0, 
next_branch=0x7ffff0dc, around_loop=1)
     at /home/fsirl/cvsx/gccm/gcc/cse.c:7334
7334              if (new_label_ref != 0 && INSN_UID (XEXP (new_label_ref, 
0)) != 0
(gdb) l
7329
7330              /* If this insn uses a LABEL_REF and there isn't a REG_LABEL
7331                 note for it, we must rerun jump since it needs to 
place the
7332                 note.  If this is a LABEL_REF for a CODE_LABEL that 
isn't in
7333                 the insn chain, don't do this since no REG_LABEL will 
be added. */
7334              if (new_label_ref != 0 && INSN_UID (XEXP (new_label_ref, 
0)) != 0
7335                  && reg_mentioned_p (new_label_ref, PATTERN (insn))
7336                  && ! find_reg_note (insn, REG_LABEL, XEXP 
(new_label_ref, 0)))
7337                recorded_label_ref = 1;
7338            }
(gdb) p debug_rtx(insn)
(insn/i 330 327 331 (set (reg/f:SI 196)
         (plus:SI (reg/f:SI 193)
             (const_int 8 [0x8]))) 36 {*addsi3_internal1} (nil)
     (expr_list:REG_EQUAL (const:SI (plus:SI (label_ref:SI 336)
                 (const_int 8 [0x8])))
         (nil)))
$1 = void
(gdb) p debug_rtx(new_label_ref)

(const:SI (plus:SI (label_ref:SI 336)
         (const_int 8 [0x8])))
$2 = void

The bootstrap worked last on Friday with this being the last patch:
2001-02-16  Neil Booth  <neil@daikokuya.demon.co.uk>

         * cppfiles.c (_cpp_make_system_header): Generate a file
         change callback.

The next bootstrap on Friday failed and had Richard Kenner's cse patch as 
its last patch:

         * cse.c (new_label_ref): New variable.
         (insert): Set it instead of recorded_label_ref.
         (cse_basic_block): Set recorded_label_ref if new_label_ref use, has
         CODE_LABEL for this function, and not already in REG_LABEL note.


Franz.


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