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

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

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

--- Comment #3 from Waffl3x <waffl3x at gcc dot gnu.org> ---
Further reduced case, will take a crack at fixing this.
https://godbolt.org/z/hnMxahWjr
```
struct S
{
  S *_twin;

  constexpr S()
    : _twin(new S{this}) {}

  constexpr S(S* p)
    : _twin(p) {}

  constexpr S(S&& _other)
    : _twin(_other._twin)
  {
    _twin->_twin = this;
  }
};

constexpr S
make_s()
{
  return S{};
}

constexpr void
go()
{
  S s = make_s();
  if (s._twin->_twin->_twin)
    ;
  delete s._twin;
}

static_assert((go(), true));
```

Reply via email to