Created attachment 41988 [details] Reproduce case Crash when using a parenthesized initialization of a member array with a constexpr constructor. Whittled the reproduce case down as much as I could, all parts of the reproduce case source seem relevant to causing the crash. Switching to the standard initialization of the member array without parentheses fixes the crash. Crash error: main.cpp:46:46: internal compiler error: in verify_ctor_sanity, at cp/constexpr.c:2635 constexpr Foo<int, bool> foobar(32, false);
Started with r230365. Most likely a dup of PR86917.
Reduced. But the PR86917 is much simpler, so I'd start with fixing that one. template <unsigned long...> struct b; template <typename, typename> struct g; template <unsigned long... c, unsigned long... d> struct g<b<c...>, b<d...>> { using e = b<c..., d...>; }; template <int f> struct i : g<typename i<f / 2>::e, typename i<f - f / 2>::e> {}; template <> struct i<1> { typedef b<0> e; }; template <typename h, h...> struct j {}; template <typename h, h f, typename = typename i<f>::e> struct o; template <typename h, h f, unsigned long... k> struct o<h, f, b<k...>> { typedef j<h, k...> e; }; template <typename h, h f> using l = typename o<h, f>::e; template <long... k> using m = j<unsigned long, k...>; template <long f> using n = l<unsigned long, f>; struct q { constexpr q(int) { } }; template <int p> struct G { typedef q r[p]; }; template <int p> struct H { typename G<p>::r s; q operator[](long); }; template <typename... t> class I { public: constexpr I(t... v) : I(v..., n<5>{}) {} template <unsigned long... w> constexpr I(t... v, m<w...> x) : u({y(v..., x)[w]...}) {} template <unsigned long... w> auto y(t..., m<w...>) { H<5> a{w...}; return a; } q u[5]; }; int main() { I<int, bool> c(2, false); }
Yes, duplicate. *** This bug has been marked as a duplicate of bug 86917 ***