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]
Other format: [Raw text]

[Bug middle-end/66214] [6 Regression] ICE verify_type failed with -O0 -g via gen_type_die_with_usage's dwarf2out.c:20250


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66214

Adam Lackorzynski <adam at os dot inf.tu-dresden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adam at os dot inf.tu-dresden.de

--- Comment #25 from Adam Lackorzynski <adam at os dot inf.tu-dresden.de> ---
I've also came across this ICE, with this reduced testcase:

template< typename C > class Dl
{
  class __ii { };
  typedef __ii It;
  It ii(typename C::I *e) { return It(e); }
};

template<typename E> class X1 { typename E::L foo; };

struct M
{
  struct CO { typedef M I; };
  enum Type { };
  typedef Dl<CO> L;
  Type t;
  struct R { X1<M> f; };
};

With: gcc version 6.0.0 20151119 (experimental) (GCC) 

t.i: In instantiation of âclass Dl<M::CO>â:
t.i:8:47:   required from âclass X1<M>â
t.i:16:20:   required from here
t.i:1:30: error: TYPE_CANONICAL is not compatible
 template< typename C > class Dl
                              ^~

 <record_type 0x7f1ccca84d20 M type_5 type_6 VOID
    align 8 symtab -862572464 alias set -1 canonical type 0x7f1ccca84d20
    fields <field_decl 0x7f1ccca8bd10 t
        type <enumeral_type 0x7f1ccca8c348 Type type <integer_type
0x7f1ccca8c3f0 unsigned int>
            asm_written unsigned SI
            size <integer_cst 0x7f1ccc939e58 constant 32>
            unit size <integer_cst 0x7f1ccc939e70 constant 4>
            align 32 symtab -862572224 alias set -1 canonical type
0x7f1ccca8c348 precision 32 min <integer_cst 0x7f1ccc95a0f0 0> max <integer_cst
0x7f1ccc95a0d8 4294967295> context <record_type 0x7f1ccca84d20 M>
            chain <type_decl 0x7f1ccca8bab0 Type>>
        decl_3 VOID file t.i line 15 col 8
        align 1 offset_align 1 context <record_type 0x7f1ccca84d20 M>
        chain <type_decl 0x7f1ccca8b720 M type <record_type 0x7f1ccca84dc8 M>
            used nonlocal decl_4 VOID file t.i line 11 col 1
            align 1 context <record_type 0x7f1ccca84d20 M> result <record_type
0x7f1ccca84d20 M>
            chain <type_decl 0x7f1ccca8b850 CO>>> context
<translation_unit_decl 0x7f1ccc945168 D.1>
    full-name "struct M"
    n_parents=0 use_template=0 interface-unknown
    pointer_to_this <pointer_type 0x7f1ccca8cc78> chain <type_decl
0x7f1ccca8b688 M>>
 <record_type 0x7f1ccca8c000 I type_5 VOID
    align 8 symtab -862572304 alias set -1 canonical type 0x7f1ccca84d20
    fields <type_decl 0x7f1ccca8b720 M
        type <record_type 0x7f1ccca84dc8 M type_5 VOID
            align 8 symtab 0 alias set -1 canonical type 0x7f1ccca84d20 context
<translation_unit_decl 0x7f1ccc945168 D.1>
            full-name "struct M"
            n_parents=0 use_template=0 interface-unknown
            chain <type_decl 0x7f1ccca8b688 M>>
        used nonlocal decl_4 VOID file t.i line 11 col 1
        align 1 context <record_type 0x7f1ccca84d20 M>
        result <record_type 0x7f1ccca84d20 M type_5 type_6 VOID
            align 8 symtab -862572464 alias set -1 canonical type
0x7f1ccca84d20 fields <field_decl 0x7f1ccca8bd10 t> context
<translation_unit_decl 0x7f1ccc945168 D.1>
            full-name "struct M"
            n_parents=0 use_template=0 interface-unknown
            pointer_to_this <pointer_type 0x7f1ccca8cc78> chain <type_decl
0x7f1ccca8b688 M>>

        chain <type_decl 0x7f1ccca8b850 CO type <record_type 0x7f1ccca84e70 CO>
            public decl_2 VOID file t.i line 12 col 10
            align 8 context <record_type 0x7f1ccca84d20 M> chain <type_decl
0x7f1ccca8bab0 Type>>> context <translation_unit_decl 0x7f1ccc945168 D.1>
    full-name "M::CO::I"
    n_parents=0 use_template=0 interface-unknown
    pointer_to_this <pointer_type 0x7f1ccca8cbd0> chain <type_decl
0x7f1ccca8b688 M>>
t.i:1:30: internal compiler error: verify_type failed
0xf75d1c verify_type(tree_node const*)
        ../../gcc/gcc/tree.c:13818
0x991de4 gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20739
0x992428 gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20836
0x9932e6 gen_type_die
        ../../gcc/gcc/dwarf2out.c:20932
0x99efb7 gen_formal_types_die
        ../../gcc/gcc/dwarf2out.c:18283
0x9978b5 gen_subprogram_die
        ../../gcc/gcc/dwarf2out.c:19141
0x9996ac gen_decl_die
        ../../gcc/gcc/dwarf2out.c:21496
0x994563 gen_member_die
        ../../gcc/gcc/dwarf2out.c:20432
0x994563 gen_struct_or_union_type_die
        ../../gcc/gcc/dwarf2out.c:20516
0x994563 gen_tagged_type_die
        ../../gcc/gcc/dwarf2out.c:20717
0x99278d gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20877
0x9932e6 gen_type_die
        ../../gcc/gcc/dwarf2out.c:20932
0x999c71 gen_decl_die
        ../../gcc/gcc/dwarf2out.c:21519
0x99a6bc dwarf2out_decl
        ../../gcc/gcc/dwarf2out.c:21974
0x99a9fb dwarf2out_type_decl
        ../../gcc/gcc/dwarf2out.c:21684
0xc0175f rest_of_type_compilation(tree_node*, int)
        ../../gcc/gcc/passes.c:335
0x6b0956 finish_struct_1(tree_node*)
        ../../gcc/gcc/cp/class.c:6776
0x67ff9b instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:10198
0x67ff9b instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:10238
0x723f4b complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:131
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

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