https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109978
Bug ID: 109978
Summary: ICE in tsubst, at cp/pt.cc:15869: alias template + c
array size deduction + lambda
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: oficsu at gmail dot com
Target Milestone: ---
Created attachment 55162
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55162&action=edit
A minimal reproducible example
Lambdas in unevaluated contexts combined with an alias template to a c-style
array causes ICE when it's used to deduce the size of an array passed to a
function template, MRE:
template
using array = int[N];
template
void foo(array&&) {}
int main() {
foo({1, 2, 3});
}
I've used a system GCC to generate the bug report, but other versions
(including trunk releases) affected also. See more on Compiler Explorer:
https://godbolt.org/z/zW6KETaYn