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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to dark_sylinc from comment #0)
>  * AFAIK it is legal to call the destructor.

Only if you have ensured it won't be called implicitly, e.g. by creating it on
the heap. Your object is an automatic (stack) variable, so gets destroyed three
times in total, which is so invalid it hurts.

Reply via email to