ICE with enable-checking in toplev.c:3594

Andreas Jaeger aj@suse.de
Sun Nov 7 04:23:00 GMT 1999


The current CVS version (last update 19991106 at 18:00 UTC) gives the
following error while bootstraping with --enable-checking on
i686-linux with glibc 2.1.2:

./xgcc -B/opt/gcc-2.96/i686-pc-linux-gnu/bin/ -B./ -I/opt/gcc-2.96/i686-pc-linux-gnu/include -O2   -DIN_GCC    -W -Wall -O2 -g -O2 -I./include  -fPIC -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -g -O2 -I. -I../../cvs/gcc/gcc -I../../cvs/gcc/gcc/config -I../../cvs/gcc/gcc/../include \
  -c ../../cvs/gcc/gcc/cp/tinfo.cc
In file included from include/typeinfo:9,
                 from ../../cvs/gcc/gcc/cp/tinfo.h:4,
                 from ../../cvs/gcc/gcc/cp/tinfo.cc:31:
include/exception: In method `exception::exception ()':
include/exception:15: Tree check: expected class 'd', have 't' (record_type)
include/exception:15: Internal compiler error in `rest_of_compilation', at toplev.c:3594
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
make[3]: *** [tinfo.o] Error 1
make[3]: Leaving directory `/usr/src/build-cc/gcc'


 ./cc1plus tinfo.ii -quiet -dumpbase tinfo.cc -g -g1 -g -O2 -O2 -O2 -O2 -W -Wall -version -fPIC -o tinfo.s
GNU C++ version 2.96 19991106 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.96 19991106 (experimental).
In file included from include/typeinfo:9,
                 from ../../cvs/gcc/gcc/cp/tinfo.h:4,
                 from ../../cvs/gcc/gcc/cp/tinfo.cc:31:
include/exception: In method `exception::exception ()':
include/exception:15: Tree check: expected class 'd', have 't' (record_type)
include/exception:15: Internal compiler error in `rest_of_compilation', at toplev.c:3594
Please submit a full bug report.


GNU C++ version 2.96 19991106 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.96 19991106 (experimental).

Breakpoint 5, rest_of_compilation (decl=0x40123e80)
    at ../../cvs/gcc/gcc/toplev.c:3594
3594		   parent != 0; parent = DECL_CONTEXT (parent))
#0  rest_of_compilation (decl=0x40123e80) at ../../cvs/gcc/gcc/toplev.c:3594
#1  0x83d89ec in finish_function (lineno=15, flags=0)
    at ../../../cvs/gcc/gcc/cp/decl.c:13732
#2  0x84692b3 in expand_body (fn=0x40123e80)
    at ../../../cvs/gcc/gcc/cp/semantics.c:2559
#3  0x842d38e in yyparse () at parse.y:2063
#4  0x804ba24 in compile_file (name=0x40127f70 "tinfo.ii")
    at ../../cvs/gcc/gcc/toplev.c:3213
#5  0x804f629 in main (argc=18, argv=0xbffff7b4)
    at ../../cvs/gcc/gcc/toplev.c:5586
3589	      /* If this is nested inside an inlined external function, pretend
3590		 it was only declared.  Since we cannot inline such functions,
3591		 generating code for this one is not only not necessary but will

3592		 confuse some debugging output writers.  */
3593	      for (parent = DECL_CONTEXT (current_function_decl);
3594		   parent != 0; parent = DECL_CONTEXT (parent))
3595		if (TREE_CODE (parent) == FUNCTION_DECL
3596		    && DECL_INLINE (parent) && DECL_EXTERNAL (parent))
3597		  {
3598		    DECL_INITIAL (decl) = 0;
(gdb) p debug_tree (parent)
 <record_type 0x40123b80 exception
    addressable permanent tree_2 needs-constructing type_1 type_2 type_4 type_5 BLK
    size <integer_cst 0x4012ca00 type <integer_type 0x4001c500 unsigned int> constant permanent 32>
    align 32 symtab 0 alias set 0
    fields <type_decl 0x40123d00 exception type <record_type 0x40123b80 exception>
       
        permanent in_system_header nonlocal VOID file include/exception line 13
        align 1 context <record_type 0x40123b80 exception>
        decl-main-variant 0x40123d00
        chain <field_decl 0x4012dc00 _vptr.exception type <pointer_type 0x40121980>
           
            unsigned permanent in_system_header virtual SI file include/exception line 18
            size <integer_cst 0x4011fbe0 constant permanent 32>
            align 32
            bitpos <integer_cst 0x4012c9c0 constant permanent 0> context <record_type 0x40123b80 exception> arguments <integer_cst 0x4012c9c0 0>>>
   needs-constructor needs-destructor ~X() X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-only
    member-functions <tree_vec 0x4012b640
        permanent
        elt 0 <overload 0x4012a210>
        elt 1 <function_decl 0x4012d080 exception>
        elt 2 <function_decl 0x4012db00 __as>
        elt 3 <function_decl 0x4012d380 what>>
    pointer_to_this <pointer_type 0x40123c00> reference_to_this <reference_type 0x4012d900> chain <type_decl 0x40123c80 exception>>
$1 = void
(gdb) p debug_tree (current_function_decl)
 <function_decl 0x40123e80 exception
    type <method_type 0x40123e00
        type <pointer_type 0x40123c00 type <record_type 0x40123b80 exception>
           
            unsigned permanent SI
            size <integer_cst 0x40124e20 constant permanent 32>
            align 32 symtab 0 alias set 7>
       
        permanent DI
        size <integer_cst 0x40124fa0 constant permanent 64>
        align 32 symtab 0 alias set 1 method basetype <record_type 0x40123b80 exception>
        arg-types <tree_list 0x40124f80
            side-effects permanent value <pointer_type 0x40123c00>
            chain <tree_list 0x4001dfa0
                unsigned permanent value <void_type 0x40119b80 void>>>>
   
    permanent public static in_system_header external inline transparent-union decl_5 QI file include/exception line 15
    frame_size 0 context <record_type 0x40123b80 exception>
    arguments <parm_decl 0x40123f00 this type <pointer_type 0x40123c00>
       
        readonly unsigned used permanent in_system_header regdecl packed SI file include/exception line 15 size <integer_cst 0x40124e20 32>
        align 32 context <function_decl 0x40123e80 exception> initial <pointer_type 0x40123c00>
        (reg/v/u:SI 24)
        incoming-rtl (mem/u/f:SI (reg:SI 19 virtual-incoming-args) 7)>
    result <result_decl 0x4012de80 type <pointer_type 0x40123c00>
       
        unsigned permanent in_system_header regdecl packed SI file include/exception line 15 size <integer_cst 0x40124e20 32>
        align 32 context <function_decl 0x40123e80 exception>
        (reg/i:SI 0 eax)> initial <block 0x4012e3a0>
    decl-main-variant 0x40123e80
    (mem/f:QI (symbol_ref:SI ("__9exception")) 1) chain <function_decl 0x4012d080 exception>>
$2 = void



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


More information about the Gcc-bugs mailing list