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

Waffl3x <waffl3x at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |waffl3x at gcc dot gnu.org

--- Comment #2 from Waffl3x <waffl3x at gcc dot gnu.org> ---
Yeah this is mostly a dup, but it demonstrates that it isn't just
'this' but also pointers to subobjects that suffer this.
```
struct nested
{
  nested *_p;
};

struct tree
{
  nested _nested;

  constexpr tree()
    : _nested{._p = new nested} {}

  constexpr tree(tree&& _t)
    : _nested(_t._nested)
  { _nested._p->_p = &_nested; }
};

constexpr tree make()
{
  tree s;
  return s;
}

constexpr void test()
{
  tree s = make();
  if (s._nested._p->_p->_p == nullptr)
    ;
  delete s._nested._p;
}

static_assert((test(), true));
```

Reply via email to