blob: a08b1dd6f4427c15401870d45d0fae3f096cec0a [file] [log] [blame]
// PR c++/90383
// { dg-do run { target c++14 } }
// { dg-options "-O2" }
extern "C" void abort ();
struct alignas(8) A { constexpr A (bool x) : a(x) {} A () = default; bool a; };
struct B { A b; };
constexpr bool
foo ()
{
B w{A (true)};
w.b = A (true);
return w.b.a;
}
int
main ()
{
if (!foo ())
abort ();
}