https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96515
Bug ID: 96515
Summary: [concepts] Segfault on ill-formed pack expansions in
requires-expression
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: arthur.j.odwyer at gmail dot com
Target Milestone: ---
// https://godbolt.org/z/rafY6G
template<typename... Args>
concept PackHasAdd = (requires(Args... args) {
(args+1);
} && ...);
static_assert(PackHasAdd<int>);
int main() {}
Compile with GCC trunk (11.0.0), "g++ -std=c++20":
<source>:7:31: internal compiler error: Segmentation fault
7 | static_assert(PackHasAdd<int>);
| ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.