[Bug c++/29080] [4.0/4.1/4.2 Regression] Multiple-inheritance with template method function code triggers "internal compiler error: in build_base_path, at cp/class.c:273"

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Sep 23 15:19:00 GMT 2006



------- Comment #4 from steven at gcc dot gnu dot org  2006-09-23 15:19 -------
Breakpoint 1, fancy_abort (file=0xde98b0 "../../trunk/gcc/cp/class.c",
line=272,
    function=0xde98a0 "build_base_path") at ../../trunk/gcc/diagnostic.c:642
642       internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) up
#1  0x00000000004c328a in build_base_path (code=PLUS_EXPR, expr=0x2aaaaaf85340,
    binfo=0x2aaaaaac19a0, nonnull=1) at ../../trunk/gcc/cp/class.c:269
269       gcc_assert ((code == MINUS_EXPR
(gdb) l
264
265       probe = TYPE_MAIN_VARIANT (TREE_TYPE (expr));
266       if (want_pointer)
267         probe = TYPE_MAIN_VARIANT (TREE_TYPE (probe));
268
269       gcc_assert ((code == MINUS_EXPR
270                    && SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), probe))
271                   || (code == PLUS_EXPR
272                       && SAME_BINFO_TYPE_P (BINFO_TYPE (d_binfo), probe)));
273
(gdb) p code
$1 = PLUS_EXPR
(gdb)
(gdb) p probe
$2 = (tree) 0x2aaaaaf7db00
(gdb) p debug_tree(probe)
 <record_type 0x2aaaaaf7db00 Join type_1 type_5 HI
    size <integer_cst 0x2aaaaadf09c0 type <integer_type 0x2aaaaae030b0
bit_size_type> constant invariant 16>
    unit size <integer_cst 0x2aaaaadf09f0 type <integer_type 0x2aaaaae03000
long unsigned int> constant invariant 2>
    align 8 symtab 0 alias set -1
    fields <type_decl 0x2aaaaaf87000 Join type <record_type 0x2aaaaaf7db00
Join>
        nonlocal decl_4 VOID file t.C line 7
        align 1 context <record_type 0x2aaaaaf7db00 Join>
       >
    X() X(constX&) this=(X&) n_parents=2 use_template=0 interface-unknown
    pointer_to_this <pointer_type 0x2aaaaaf7ddc0> chain <type_decl
0x2aaaaaf20dd0 Join>>
$3 = void
(gdb) p debug_tree(d_binfo)
 <tree_binfo 0x2aaaaaac1930
    type <record_type 0x2aaaaaf7d840 Left type_1 type_5 QI
        size <integer_cst 0x2aaaaadf07b0 constant invariant 8>
        unit size <integer_cst 0x2aaaaadf07e0 constant invariant 1>
        align 8 symtab 0 alias set -1
        fields <type_decl 0x2aaaaaf20d00 Left type <record_type 0x2aaaaaf7d840
Left>
            nonlocal decl_4 VOID file t.C line 5
            align 1 context <record_type 0x2aaaaaf7d840 Left>
           >
        X() X(constX&) this=(X&) n_parents=1 use_template=0 interface-unknown
        chain <type_decl 0x2aaaaaf20c30 Left>>
    private>
$4 = void
(gdb) p d_binfo->common.type
$5 = (tree) 0x2aaaaaf7d840
(gdb) p debug_tree(d_binfo->common.type)
 <record_type 0x2aaaaaf7d840 Left type_1 type_5 QI
    size <integer_cst 0x2aaaaadf07b0 type <integer_type 0x2aaaaae030b0
bit_size_type> constant invariant 8>
    unit size <integer_cst 0x2aaaaadf07e0 type <integer_type 0x2aaaaae03000
long unsigned int> constant invariant 1>
    align 8 symtab 0 alias set -1
    fields <type_decl 0x2aaaaaf20d00 Left type <record_type 0x2aaaaaf7d840
Left>
        nonlocal decl_4 VOID file t.C line 5
        align 1 context <record_type 0x2aaaaaf7d840 Left>
       >
    X() X(constX&) this=(X&) n_parents=1 use_template=0 interface-unknown
    chain <type_decl 0x2aaaaaf20c30 Left>>
$6 = void
(gdb)



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29080



More information about the Gcc-bugs mailing list