https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126194

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

https://gcc.gnu.org/g:080af1a675d94dc25d248b2638e82c03e1476c01

commit r17-2385-g080af1a675d94dc25d248b2638e82c03e1476c01
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.

Reply via email to