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: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Aug 2014 09:39:33 +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
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.0
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
The original testcase is now optimized to just "return 0;". Performing similar
optimizations for new/delete as for malloc/free is a different issue, that I am
sure is already covered by several PRs. Currently, the simplest workaround is
to inline new and delete.