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

            Bug ID: 60314
           Summary: [4.9][C++1y] ICE with decltype(auto) when generating
                    debug information
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucdanton at free dot fr

Using trunk (g++-trunk (GCC) 4.9.0 20140222 (experimental)):

$ cat main.cpp 
// fine
// decltype(auto) qux() { return 42; }

struct foo {
    // also ICEs if not static
    static decltype(auto) bar()
    { return 42; }
};

int main()
{
}

$ g++-trunk -std=c++1y main.cpp # Succeeds
$ g++-trunk -std=c++1y main.cpp -g
main.cpp:4:8: internal compiler error: in gen_type_die_with_usage, at
dwarf2out.c:19864
 struct foo {
        ^
0x8dcdf9 gen_type_die_with_usage
    ../../gcc/gcc/dwarf2out.c:19864
0x8d9945 gen_decl_die
    ../../gcc/gcc/dwarf2out.c:20361
0x8db9f4 gen_member_die
    ../../gcc/gcc/dwarf2out.c:19414
0x8db9f4 gen_struct_or_union_type_die
    ../../gcc/gcc/dwarf2out.c:19486
0x8db9f4 gen_tagged_type_die
    ../../gcc/gcc/dwarf2out.c:19676
0x8dcd6d gen_type_die_with_usage
    ../../gcc/gcc/dwarf2out.c:19823
0x8d9ba2 gen_decl_die
    ../../gcc/gcc/dwarf2out.c:20400
0xae80b2 rest_of_type_compilation(tree_node*, int)
    ../../gcc/gcc/passes.c:283
0x653f70 finish_struct_1(tree_node*)
    ../../gcc/gcc/cp/class.c:6636
0x65548c finish_struct(tree_node*, tree_node*)
    ../../gcc/gcc/cp/class.c:6801
0x6880a1 cp_parser_class_specifier_1
    ../../gcc/gcc/cp/parser.c:19249
0x6880a1 cp_parser_class_specifier
    ../../gcc/gcc/cp/parser.c:19468
0x6880a1 cp_parser_type_specifier
    ../../gcc/gcc/cp/parser.c:14305
0x6a112d cp_parser_decl_specifier_seq
    ../../gcc/gcc/cp/parser.c:11547
0x6a7ab9 cp_parser_simple_declaration
    ../../gcc/gcc/cp/parser.c:11137
0x68b570 cp_parser_block_declaration
    ../../gcc/gcc/cp/parser.c:11086
0x6b4abb cp_parser_declaration
    ../../gcc/gcc/cp/parser.c:10983
0x6b373d cp_parser_declaration_seq_opt
    ../../gcc/gcc/cp/parser.c:10869
0x6b4f9a cp_parser_translation_unit
    ../../gcc/gcc/cp/parser.c:4014
0x6b4f9a c_parse_file()
    ../../gcc/gcc/cp/parser.c:31568
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.

Reply via email to