https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98635
Bug ID: 98635
Summary: ad-hoc requirement without semicolon creates internal
compiler bug
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nico at josuttis dot de
Target Milestone: ---
https://godbolt.org/z/nPsT7n:
void printColl(auto& coll)
requires requires {
coll.begin()
}
{
}
yields:
<source>:3:24: error: expected ';' before '}' token
3 | coll.begin()
| ^
| ;
4 | }
| ~
<source>:4:10: internal compiler error: Segmentation fault
4 | }
| ^
0x1cc31d9 internal_error(char const*, ...)
???:0
0x79a2b6 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
???:0
0x79dda6 start_function(cp_decl_specifier_seq*, cp_declarator const*,
tree_node*)
???:0
0x8d803d c_parse_file()
???:0
0xa54072 c_common_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1