c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-nsdmi10.C
blob35cb8acc15b5e44bd22472a81361d73eaf1dba5f
1 // PR c++/101073
2 // { dg-do compile { target c++14 } }
3 // { dg-additional-options "-fno-elide-constructors" }
4 // A copy of constexpr-nsdmi9.C.
6 struct Y
8   int a;
9 };
11 struct X
13   Y b = (c={5});
14   Y c = (b={1});
17 constexpr X o = { };
18 static_assert(o.b.a == 1 && o.c.a == 1, "");