https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104846
Bug ID: 104846
Summary: [10/11/12 Regression] ICE: tree check: expected
function_decl, have field_decl in grokmethod, at
cp/decl.cc:17999
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Started between 20190811 and 20190818 :
$ cat z1.cc
struct S { auto operator delete[] () {} };
$ g++-12-20220306 -c z1.cc
z1.cc:1:12: error: non-static data member declared with placeholder 'auto'
1 | struct S { auto operator delete[] () {} };
| ^~~~
z1.cc:1:36: internal compiler error: tree check: expected function_decl, have
field_decl in grokmethod, at cp/decl.cc:17999
1 | struct S { auto operator delete[] () {} };
| ^
0x6c7078 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.cc:8688
0x80b3fd tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3450
0x80b3fd grokmethod(cp_decl_specifier_seq*, cp_declarator const*, tree_node*)
../../gcc/cp/decl.cc:17999
0x8f2348 cp_parser_save_member_function_body
../../gcc/cp/parser.cc:31899
0x93cd44 cp_parser_member_declaration
../../gcc/cp/parser.cc:27381
0x9076c2 cp_parser_member_specification_opt
../../gcc/cp/parser.cc:26821
0x9076c2 cp_parser_class_specifier_1
../../gcc/cp/parser.cc:25887
0x90a4d2 cp_parser_class_specifier
../../gcc/cp/parser.cc:26204
0x90a4d2 cp_parser_type_specifier
../../gcc/cp/parser.cc:19348
0x90b1e6 cp_parser_decl_specifier_seq
../../gcc/cp/parser.cc:15911
0x90be61 cp_parser_simple_declaration
../../gcc/cp/parser.cc:15159
0x93e7ee cp_parser_declaration
../../gcc/cp/parser.cc:14972
0x93f36d cp_parser_translation_unit
../../gcc/cp/parser.cc:5012
0x93f36d c_parse_file()
../../gcc/cp/parser.cc:48051
0xacd922 c_common_parse_file()
../../gcc/c-family/c-opts.cc:1238