https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101894
Bug ID: 101894 Summary: [11/12 Regression] [concepts] ICE with multiple friend declarations Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following valid code snippet (compiled with "-fconcepts") triggers an ICE since GCC 11: ================================= struct A { friend void foo(auto); friend void foo(auto) {} }; ================================= bug.cc:4:25: internal compiler error: in push_template_decl, at cp/pt.c:5714 4 | friend void foo(auto) {} | ^ 0x6fe076 push_template_decl(tree_node*, bool) ../../gcc/gcc/cp/pt.c:5714 0x9ba6f4 start_preparsed_function(tree_node*, tree_node*, int) ../../gcc/gcc/cp/decl.c:16635 0xac45f2 cp_parser_late_parsing_for_member ../../gcc/gcc/cp/parser.c:31801 0xa9d73b cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:25879 0xa9e6cf cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:25903 0xa9e6cf cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:19121 0xa9f6cc cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:15713 0xaa0644 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:14961 0xacfdb5 cp_parser_declaration ../../gcc/gcc/cp/parser.c:14787 0xad078e cp_parser_toplevel_declaration ../../gcc/gcc/cp/parser.c:14808 0xad078e cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4978 0xad078e c_parse_file() ../../gcc/gcc/cp/parser.c:46558 0xbf924d c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1223 Please submit a full bug report, [etc.]