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

            Bug ID: 58536
           Summary: [c++1y] ICE with auto in constructor
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following (valid, I think) code snippet (compiled with "-std=gnu++1y")
triggers an ICE on trunk (4.9.0 20130922):

================
struct A
{
  A(auto);
};

A::A(auto) {}
================

bug.cc:6:10: internal compiler error: in poplevel_class, at
cp/name-lookup.c:2928
 A::A(auto) {}
          ^
0x6f4834 poplevel_class()
        ../../gcc/gcc/cp/name-lookup.c:2928
0x5e9c88 popclass()
        ../../gcc/gcc/cp/class.c:7033
0x5ea10a pop_nested_class()
        ../../gcc/gcc/cp/class.c:7179
0x642cf9 cp_parser_direct_declarator
        ../../gcc/gcc/cp/parser.c:17213
0x642cf9 cp_parser_declarator
        ../../gcc/gcc/cp/parser.c:16690
0x649679 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16258
0x64a32f cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:10986
0x64c190 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10867
0x6551ae cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10764
0x653f0d cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10650
0x6557e6 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x6557e6 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28893
0x768164 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]

Reply via email to