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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #8)
> (In reply to Jakub Jelinek from comment #5)
> > CCing Jason whether the type on the MEM_REF in the clobber stmt in C::~C is
> > appropriate though.
> 
> What MEM_REF?  Compiling with -fdump-tree-gimple the only clobber I see is
> 
>         *this = {CLOBBER};
> 
> are you suggesting that we should only clobber the CLASSTYPE_AS_BASE subset
> of *this?  That makes sense.

*this is actually MEM_REF<this, 0> with some type, and yeah, I mean that
clobber.
Don't know how exactly CLASSTYPE_AS_BASE differs from the type of *this to know
what should be clobbered, the clobber should say as accurately as possible what
becomes undefined after the dtor ends, so that e.g. stores to fields in the
class can be DSEd if nothing uses them until the destructor.

Reply via email to