http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58549
Bug ID: 58549 Summary: [c++1y] ICE with local function in function with auto parameter 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 code snippet (compiled with "-std=gnu++1y") triggers an ICE on trunk (4.9.0 20130926): =========================== void foo(auto) { void bar(); } =========================== bug.cc: In function 'void foo(<auto1>)': bug.cc:4:1: internal compiler error: in finish_function, at cp/decl.c:13852 } ^ 0x56b38f finish_function(int) ../../gcc/gcc/cp/decl.c:13852 0x65333d cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22344 0x654027 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22259 0x654027 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16347 0x6542df cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x656140 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65f16e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65decd cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65f7b6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65f7b6 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 0x772e94 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]