This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61982] Optimizer does not eliminate stores to destroyed objects
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Aug 2014 15:11:51 +0000
- Subject: [Bug c++/61982] Optimizer does not eliminate stores to destroyed objects
- Auto-submitted: auto-generated
- References: <bug-61982-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61982
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The CLOBBER for non-decl expressions is added in the destructors, here we have
trivial destructor, so it is "inlined" already by the frontend and thus not
emitted. Perhaps we could emit it in the places where we'd normally insert a
call to destructor if the object being destructed is not a decl (in that case I
believe adding the CLOBBER for it should be handled during gimplification).