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

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #8)
> (In reply to Richard Biener from comment #5)
> > GIMPLE at -O1 looks OK-ish - release on all paths:
> 
> But release decrements the weak_count, and only calls _M_destroy() if the
> count reaches zero.

And the problem is that a call to weak_release() from the
enable_shared_from_this dtor is missing, so the count never reaches zero.

Reply via email to