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.