This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/62112] Optimize out malloc when block is unused or write-only
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Aug 2014 08:20:42 +0000
- Subject: [Bug tree-optimization/62112] Optimize out malloc when block is unused or write-only
- Auto-submitted: auto-generated
- References: <bug-62112-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62112
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-08-13
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We don't aggressively "lower" memcpy even if we could and in this case we
miss the point where x and y become "dead" (you don't call free()).
Note that the issue Marc mentions is simply that we don't DSE calls
(usually not important apart from for memcpy like builtins). It shouldn't
be terribly hard to add this though.
Confirmed.