RFA (clobbers, gimplification): PATCH for c++/61982, dead stores to destroyed objects

Richard Biener richard.guenther@gmail.com
Mon Apr 30 12:48:00 GMT 2018


On Fri, Apr 27, 2018 at 11:43 PM, Jason Merrill <jason@redhat.com> wrote:
> 61982 notes that an explicit destructor call or delete expression ends
> the lifetime of an object, but we weren't clobbering affected objects
> if their destructors are trivial.  This patch fixes that.
>
> The first commit just adds a helper function, build_clobber.
>
> The second commit changes explicit destruction to clobber the affected
> object.  As a result, I needed to change the gimplifier to handle the
> more general forms of lvalue we might be clobbering, by introducing a
> temporary.  I'm not sure why clobbers are so picky about the form of
> lvalue they can use, but this makes it work.
>
> Tested x86_64-pc-linux-gnu.  OK for trunk (9)?

Ok for the middle-end parts.

Richard.



More information about the Gcc-patches mailing list