[Bug c++/97151] GCC fails to optimize away uselessly allocated arrays (C++)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 23 08:14:40 GMT 2020


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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:9e64f17d044767248175fece80a2759d94c45fc4

commit r11-3386-g9e64f17d044767248175fece80a2759d94c45fc4
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Sep 23 10:11:03 2020 +0200

    tree-optimization/97151 - improve PTA for C++ operator delete

    C++ operator delete, when DECL_IS_REPLACEABLE_OPERATOR_DELETE_P,
    does not cause the deleted object to be escaped.  It also has no
    other interesting side-effects for PTA so skip it like we do
    for BUILT_IN_FREE.

    2020-09-23  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97151
            * tree-ssa-structalias.c (find_func_aliases_for_call):
            DECL_IS_REPLACEABLE_OPERATOR_DELETE_P has no effect on
            arguments.

            * g++.dg/cpp1y/new1.C: Adjust for two more handled transforms.


More information about the Gcc-bugs mailing list