https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125211
Bug ID: 125211
Summary: [13/14/15/16/17 Regression] ICE with an anonumous
union in a generic lambda defined as part of a
templated variable
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: c++-lambda, ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
testcase:
```
template <typename T>
auto f = [](auto... args) {
union {
char c;
};
c = 'a';
};
void g() { f<void>(); }
```
Forwarded from
https://discourse.llvm.org/t/collection-of-minimal-clang-frontend-assertion-failure-test-cases/90735/6.
This was actually the only testcase of this suite which ICEs with GCC too.
This used to work with GCC 7.5.0.