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]

C++ boostrap ICE w/new-abi


A template decl is found where a function decl is expected.

CONFIG:
SRC/configure --with-gcc-version-trigger=/u/build/gcc/egcs-new/SRC/gcc/version.c --host=i686-pc-linux --prefix=/usr/local/egcs --enable-threads=posix --enable-shared --enable-version-specific-runtime-libs --enable-languages=objc,c++ --enable-new-gxx-abi --enable-namespaces --enable-libstdcxx-v3 --enable-long-long --norecursion 

ERROR:
/u/build/gcc/egcs-new/gcc/g++ -B/u/build/gcc/egcs-new/gcc/ -B/usr/local/egcs/i686-pc-linux/bin/ -DHAVE_CONFIG_H -I. -I../../../SRC/libstdc++-v3/src -I.. -nostdinc++ -I../../../SRC/libstdc++-v3 -I../../../SRC/libstdc++-v3/libio -I../../../SRC/libstdc++-v3/config/cpu/i486 -I../../../SRC/libstdc++-v3/config/gnu-linux -I/usr/local/egcs/include -pipe -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -Werror -fdiagnostics-show-location=once -g -c  -fPIC -DPIC c++io.cc -o .libs/c++io.lo
In file included from ../../../SRC/libstdc++-v3/bits/std_string.h:47,
                 from ../../../SRC/libstdc++-v3/bits/localefwd.h:39,
                 from ../../../SRC/libstdc++-v3/bits/std_ios.h:42,
                 from ../../../SRC/libstdc++-v3/bits/basic_file.h:38,
                 from c++io.cc:34:
../../../SRC/libstdc++-v3/bits/std_iosfwd.h: In instantiation of `std::allocator<char>':
../../../SRC/libstdc++-v3/bits/basic_string.h:224:   instantiated from `std::basic_string<char, std::char_traits<char>, std::allocator<char> >'
../../../SRC/libstdc++-v3/bits/string.tcc:588:   instantiated from here
../../../SRC/libstdc++-v3/bits/std_iosfwd.h:44: Tree check: expected function_decl, have template_decl
../../../SRC/libstdc++-v3/bits/std_iosfwd.h:44: Internal compiler error in `build_clone', at
../SRC/gcc/cp/class.c:4032

BACKTRACE:
(gdb) where
#0  fancy_abort (file=0x83749bb "../../SRC/gcc/cp/class.c", line=4032, 
    function=0x8375bf2 "build_clone") at ../SRC/gcc/rtl.c:1236
#1  0x8299ada in build_clone (fn=0x4069a680, name=0x400f6700)
    at ../../SRC/gcc/cp/class.c:4032
#2  0x829a1ea in clone_function_decl (fn=0x4069a680, update_method_vec_p=1)
    at ../../SRC/gcc/cp/class.c:4148
#3  0x829a466 in clone_constructors_and_destructors (t=0x40153100)
    at ../../SRC/gcc/cp/class.c:4196
#4  0x829a8b5 in check_bases_and_members (t=0x40153100, empty_p=0xbf7feccc)
    at ../../SRC/gcc/cp/class.c:4298
#5  0x829c4bf in finish_struct_1 (t=0x40153100)
    at ../../SRC/gcc/cp/class.c:4984
#6  0x827df59 in instantiate_class_template (type=0x40153100)
    at ../../SRC/gcc/cp/pt.c:5158
#7  0x82d19c5 in complete_type (type=0x40153100)
    at ../../SRC/gcc/cp/typeck.c:161
#8  0x8282c52 in tsubst (t=0x4046e900, args=0x4030c520, complain=1, 
    in_decl=0x0) at ../../SRC/gcc/cp/pt.c:6646
#9  0x8281802 in tsubst (t=0x4046e980, args=0x4030c520, complain=1, 
    in_decl=0x0) at ../../SRC/gcc/cp/pt.c:6182
#10 0x827dacf in instantiate_class_template (type=0x4030b500)
    at ../../SRC/gcc/cp/pt.c:5046
#11 0x82d19c5 in complete_type (type=0x4030b500)
    at ../../SRC/gcc/cp/typeck.c:161
#12 0x82c9832 in yyparse () at parse.y:3015
#13 0x804c2dc in compile_file (name=0x40107308 "__gen")
    at ../SRC/gcc/toplev.c:2289
#14 0x804faed in main (argc=21, argv=0xbf7ffa94) at ../SRC/gcc/toplev.c:4726
(gdb) up
#1  0x8299ada in build_clone (fn=0x4069a680, name=0x400f6700)
    at ../../SRC/gcc/cp/class.c:4032
4032      DECL_PENDING_INLINE_P (clone) = 0;
(gdb) print clone
$1 = 0x4069d780
(gdb) pt
 <template_decl 0x4069d780 __comp_ctor
    type <method_type 0x4069a880
        type <void_type 0x400f8b80 void type_6 VOID
            align 8 symtab 21 alias set 96
            pointer_to_this <pointer_type 0x400f8c00 __builtin_va_list>>
        DI
        size <integer_cst 0x400f9000 constant 64>
        unit size <integer_cst 0x400f9020 constant 8>
        align 64 symtab 0 alias set -1 method basetype <record_type 0x40153100 allocator<char>>
        arg-types <tree_list 0x404d7300 side-effects value <pointer_type 0x40153180>
            chain <tree_list 0x404d7280 value <reference_type 0x402dce00>
                chain <tree_list 0x400f9920 unsigned value <void_type 0x400f8b80 void>>>>
        throws <tree_list 0x400f9960>>
    ignored VOID file ../../../SRC/libstdc++-v3/bits/stl_alloc.h line 593
    align 1 context <record_type 0x40153100 allocator<char>>
    arguments <tree_list 0x404d76e0
        purpose <integer_cst 0x404d76a0 constant 0x100000000>
        value <tree_vec 0x404d7620 type <template_decl 0x4069a680 allocator>
           
            elt 0 <tree_list 0x404d7640>>>
    result <function_decl 0x4069a900 allocator type <method_type 0x4069a880>
        nothrow public external inline decl_3 QI file ../../../SRC/libstdc++-v3/bits/stl_alloc.h line 593
        frame_size 0 context <record_type 0x40153100 allocator<char>>
        arguments <parm_decl 0x4069a980 this type <pointer_type 0x4069a100>
            readonly unsigned regdecl SI file ../../../SRC/libstdc++-v3/bits/stl_alloc.h line 593
            size <integer_cst 0x400f90e0 constant 32>
            unit size <integer_cst 0x400f9100 constant 4>
            align 32 initial <pointer_type 0x4069a100> chain <parm_decl 0x4069aa80>> initial <block 0x402cce80>
        template-info 0x404d73a0
        (mem:QI (symbol_ref:SI ("_ZNSaIcEC*INTERNAL*IT_EEvRKSaIT_E"))0)>
   >

-- 
Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K

c++io.s.gz

c++io.i.gz

c++io.cc.gz


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