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]

ICE while crosscompiling (in cp/decl.c:finish_function)



I've tried to crosscompile gcc from i686-Linux to mips-linux with this
configure command:
../egcs/configure --prefix=/opt/aj-mips --disable-nls --target=mips-linux --host=i686-linux --disable-nls  --enable-checking=misc,tree,rtl,gc,gcac

My system: i686, Linux 2.2.14, glibc 2.1.2.

I get this ICE:
/usr/src/aj/build-egcs-mips/gcc/g++ -B/usr/src/aj/build-egcs-mips/gcc/ -B/opt/aj-mips/mips-linux/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -I. -I../../../egcs/libio -nostdinc++ -D_IO_MTSAFE_IO ../../../egcs/libio/fstream.cc
../../../egcs/libio/fstream.cc: In method `void
../../../egcs/libio/fstream.cc: fstreambase::__thunk_84__$_11fstreambase
../../../egcs/libio/fstream.cc: (int)':
../../../egcs/libio/fstream.cc:110: Tree check: expected block, have
../../../egcs/libio/fstream.cc:110: addr_expr
../../../egcs/libio/fstream.cc:110: Internal compiler error in
../../../egcs/libio/fstream.cc:110: `finish_function', at
../../../egcs/libio/fstream.cc:110: ../egcs/gcc/cp/decl.c:14071
../../../egcs/libio/fstream.cc:110: Please submit a full bug report.
../../../egcs/libio/fstream.cc:110: See
../../../egcs/libio/fstream.cc:110: <URL:http://www.gnu.org/software/gcc/bugs.html>
../../../egcs/libio/fstream.cc:110: for instructions.
make[1]: *** [fstream.o] Error 1

The commandline for cc1plus is:
 /usr/src/aj/build-egcs-mips/gcc/cc1plus fstream.ii -quiet -dumpbase fstream.cc -g -O2 -version -fvtable-thunks -fno-implicit-templates -o fstream.s
GNU C++ version 2.96 20000313 (experimental) (mips-linux) compiled by GNU C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).

Running under gdb I get:
Breakpoint 2, fancy_abort (file=0x846ea8d "../../../egcs/gcc/cp/decl.c", 
    line=14071, function=0x8473ffb "finish_function")
    at ../../egcs/gcc/rtl.c:1249
(gdb) bt
#0  fancy_abort (file=0x846ea8d "../../../egcs/gcc/cp/decl.c", line=14071, 
    function=0x8473ffb "finish_function") at ../../egcs/gcc/rtl.c:1249
#1  0x805c293 in tree_check_failed () at ../../egcs/gcc/tree.c:5355
#2  0x8388f10 in finish_function (lineno=110, flags=0)
    at ../../../egcs/gcc/cp/decl.c:14071
#3  0x8413197 in emit_thunk (thunk_fndecl=0x403eac80)
    at ../../../egcs/gcc/cp/method.c:2162
#4  0x83c3c60 in mark_vtable_entries (decl=0x403eac00)
    at ../../../egcs/gcc/cp/decl2.c:2320
#5  0x83c46e7 in finish_vtable_vardecl (t=0x403eac80, data=0x0)
    at ../../../egcs/gcc/cp/decl2.c:2575
#6  0x8368c89 in walk_globals_r (namespace=0x4001c000, data=0xbfffeadc)
    at ../../../egcs/gcc/cp/decl.c:1856
#7  0x8368b53 in walk_namespaces_r (namespace=0x4001c000, 
    f=0x8368c10 <walk_globals_r>, data=0xbfffeadc)
    at ../../../egcs/gcc/cp/decl.c:1793
#8  0x8368c06 in walk_namespaces (f=0x8368c10 <walk_globals_r>, 
    data=0xbfffeadc) at ../../../egcs/gcc/cp/decl.c:1824
#9  0x8368cd6 in walk_globals (p=0x8368a60 <vtable_decl_p>, 
    f=0x83c4610 <finish_vtable_vardecl>, data=0x0)
    at ../../../egcs/gcc/cp/decl.c:1882
#10 0x83c6015 in finish_file () at ../../../egcs/gcc/cp/decl2.c:3466
#11 0x8420e9a in finish_translation_unit ()
    at ../../../egcs/gcc/cp/semantics.c:1801
#12 0x83e1c05 in yyparse () at parse.y:434
#13 0x804c2c0 in compile_file (name=0xbffff8be "fstream.ii")
    at ../../egcs/gcc/toplev.c:2451
#14 0x804ffc4 in main (argc=12, argv=0xbffff704)
    at ../../egcs/gcc/toplev.c:4924
#15 0x40036313 in __libc_start_main (main=0x804f950 <main>, argc=12, 
    argv=0xbffff704, init=0x8048ee4 <_init>, fini=0x8433348 <_fini>, 
    rtld_fini=0x4000ac70 <_dl_fini>, stack_end=0xbffff6fc)
    at ../sysdeps/generic/libc-start.c:90
(gdb) up
#1  0x805c293 in tree_check_failed () at ../../egcs/gcc/tree.c:5355
(gdb) up
#2  0x8388f10 in finish_function (lineno=110, flags=0)
    at ../../../egcs/gcc/cp/decl.c:14071
(gdb) p fndecl
$3 = 0x8473ffb
(gdb) pt
 <rtl_expr 0x8473ffb type <error_mark 0x665f6873>
    readonly constant addressable unsigned used nothrow protected tree_0 tree_4 tree_6
    rtl 0 (nil)

    rtl 1 (nil)
>
(gdb)

Shall I send preprocessed sources?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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