https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101730
Bug ID: 101730 Summary: [10/11/12 Regression] ICE in cp_parser_ctor_initializer_opt_and_function_body, at cp/parser.c:24549 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20200509 and 20200613 : $ cat z1.cc struct A { A() {}; void foo (auto arg) requires({}); }; $ g++-12-20210801 -c z1.cc -std=c++20 z1.cc:3:31: error: statement-expressions are not allowed outside functions nor in template-argument lists 3 | void foo (auto arg) requires({}); | ^ z1.cc:2:7: internal compiler error: Segmentation fault 2 | A() {}; | ^ 0x103188f crash_signal ../../gcc/toplev.c:328 0x8de62c cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.c:24549 0x8df37a cp_parser_function_definition_after_declarator ../../gcc/cp/parser.c:30658 0x8df85c cp_parser_late_parsing_for_member ../../gcc/cp/parser.c:31565 0x8b557a cp_parser_class_specifier_1 ../../gcc/cp/parser.c:25651 0x8b6a22 cp_parser_class_specifier ../../gcc/cp/parser.c:25675 0x8b6a22 cp_parser_type_specifier ../../gcc/cp/parser.c:18909 0x8b76f6 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:15510 0x8b8381 cp_parser_simple_declaration ../../gcc/cp/parser.c:14766 0x8e728e cp_parser_declaration ../../gcc/cp/parser.c:14592 0x8e7eb5 cp_parser_translation_unit ../../gcc/cp/parser.c:4960 0x8e7eb5 c_parse_file() ../../gcc/cp/parser.c:46179 0xa674d2 c_common_parse_file() ../../gcc/c-family/c-opts.c:1223