https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126194
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:1e24afcafee8589b54228981b8e7985e8d6faa11 commit r16-9278-g1e24afcafee8589b54228981b8e7985e8d6faa11 Author: Richard Biener <[email protected]> Date: Mon Jul 13 10:03:55 2026 +0200 tree-optimization/126194 - bogus PTA with C++ delete We currently ignore all delete calls from delete expressions for the purpose of generating PTA constraints. That's in error from r11-3612-g4f4ced28826ece which did a tree-wide change to clarify and improve eliding of new/delete pairs. The following restores the original restriction of only ignoring calls to the standard library copy of delete. This also adds a check on -fassume-sane-operators-new-delete (which is the default). PR tree-optimization/126194 * gimple-ssa-pta-constraints.cc (find_func_aliases_for_call): Only ignore calls to delete if DECL_IS_REPLACEABLE_OPERATOR. * g++.dg/lto/pr126194.h: New testcase. * g++.dg/lto/pr126194_0.C: Likewise. * g++.dg/lto/pr126194_1.C: Likewise. * g++.dg/lto/pr126194_2.C: Likewise. (cherry picked from commit 080af1a675d94dc25d248b2638e82c03e1476c01)
