[Bug c++/126645] New: ICE on self-referential structured binding pack initializer

feedabl3 at gmail dot com via Gcc-bugs <[email protected]> Tue, 04 Aug 2026 22:58:48 +0000
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126645

            Bug ID: 126645
           Summary: ICE on self-referential structured binding pack
                    initializer
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: feedabl3 at gmail dot com
  Target Milestone: ---

This program fails to compile on gcc 17

https://godbolt.org/z/P5f7vob8d


```
struct t{};

template<auto = 0> consteval auto foo() {
    auto [...xs] = t{xs...};
}

static_assert(foo());
```