[Bug c++/126124] ICE on packed structured binding through statement expression
feedabl3 at gmail dot com via Gcc-bugs <[email protected]> Tue, 04 Aug 2026 22:44:04 +0000
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126124
feedable <feedabl3 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |feedabl3 at gmail dot com
--- Comment #1 from feedable <feedabl3 at gmail dot com> ---
Same is reproducible with IILE:
https://godbolt.org/z/sdxanhz7M
```
template<auto = 0> consteval auto foo() {
int arr[] {};
( [&]{auto [...p] = arr; p;}(), ...);
}
static_assert(foo());
```
We should probably check that the packs to be expanded are not themselves part
of the pattern.