https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106965
--- Comment #4 from Boaz ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Richard Biener from comment #1)
> > I think it's undefined to invoke a DTOR twice which is what you do here.
> > After the DTOR the m_ptr member becomes u
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106965
--- Comment #2 from Boaz ---
(In reply to Richard Biener from comment #1)
> I think it's undefined to invoke a DTOR twice which is what you do here.
> After the DTOR the m_ptr member becomes undefined so re-evaluating that in
> the second invoc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106965
Bug ID: 106965
Summary: g++ optimization removes assigning 0 to deleted
pointer- causes double free.
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: