https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110167
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-06-08 Keywords| |compile-time-hog Status|UNCONFIRMED |NEW Component|libstdc++ |c++ --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: template<unsigned long N> struct array { int data[N]; }; template<unsigned long...> struct seq { }; template<unsigned long... Idx> array<sizeof...(Idx)> to_array_impl(int (&a)[sizeof...(Idx)], seq<Idx...>) { return {{a[Idx]...}}; } template<unsigned long N> array<N> to_array(int (&a)[N]) { return to_array_impl(a, seq<__integer_pack(N)...>{}); } int f[262144]; auto g(void) { return to_array(f); }