http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60064
Bug ID: 60064 Summary: [c++1y] ICE with auto as parameter of friend function 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=c++1y") triggers an ICE on trunk: =========================================== struct A { friend void foo(auto) {} }; =========================================== bug.cc:4:1: internal compiler error: in poplevel_class, at cp/name-lookup.c:2951 }; ^ 0x77ff17 poplevel_class() ../../gcc/gcc/cp/name-lookup.c:2951 0x665008 popclass() ../../gcc/gcc/cp/class.c:7127 0x679edd finish_struct(tree_node*, tree_node*) ../../gcc/gcc/cp/class.c:6808 0x6ac14a cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19218 0x6ac14a cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19437 0x6ac14a cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14302 0x6c5540 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11547 0x6cc139 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11137 0x6af5f3 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11086 0x6d68f2 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10983 0x6d55e8 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10869 0x6d6eca cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4014 0x6d6eca c_parse_file() ../../gcc/gcc/cp/parser.c:31528 0x7f6973 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, [etc.]