This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/62112] Optimize out malloc when block is unused or write-only


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]