http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58637
Bug ID: 58637 Summary: [c++1y] ICE with wrong usage of template<> in front of function containing 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 invalid line of code (compiled with "-std=c++1y") triggers an ICE on trunk (since at least 4.9.0-20130920): ============================= template<> void foo(auto); ============================= bug.cc:1:21: internal compiler error: in add_implicit_template_parms, at cp/parser.c:28978 template<> void foo(auto); ^ 0x64f044 add_implicit_template_parms ../../gcc/gcc/cp/parser.c:28978 0x64f044 cp_parser_parameter_declaration_list ../../gcc/gcc/cp/parser.c:18067 0x64f356 cp_parser_parameter_declaration_clause ../../gcc/gcc/cp/parser.c:17882 0x649f04 cp_parser_direct_declarator ../../gcc/gcc/cp/parser.c:16834 0x649f04 cp_parser_declarator ../../gcc/gcc/cp/parser.c:16705 0x650cc7 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16268 0x651fd4 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22665 0x6553fd cp_parser_explicit_specialization ../../gcc/gcc/cp/parser.c:13986 0x65cac5 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10726 0x65b5aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65ce76 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ce76 c_parse_file() ../../gcc/gcc/cp/parser.c:28911 0x7708b3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]