https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
Bug ID: 115425 Summary: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This seems like 15 regressions and may related to the constexpr static local variable. https://godbolt.org/z/sf4f3Woqa #include <tuple> template<std::size_t... Is> void foo(std::index_sequence<Is...>); template<auto> struct S; template<class T> auto test() { using Seq = std::make_index_sequence<std::tuple_size_v<T>>; constexpr static auto x = foo<Seq>(); return []<std::size_t... Is>(std::index_sequence<Is...>) { (typename S<x[Is]>::type{}, ...); }(std::make_index_sequence<0>{}); } int main() { test<std::tuple<>>(); }