https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90383

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
struct alignas(8) A { constexpr A (bool x) : a(x) {} A () = delete; bool a; };
struct B { A b; };

constexpr bool
foo ()
{
  B w{A (true)};
  w.b = A (true);
  return w.b.a;
}

static_assert (foo (), "");

The problem is in that w.b = A (true); store, somehow we end up with w being a
CONSTRUCTOR with type B, containing just FIELD_DECL a rather than FIELD_DECL b
with another CONSTRUCTOR with type A, containing just FIELD_DECL a.

Reply via email to