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

--- Comment #19 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Richard Biener
<rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:169ad482497ae9c672a825050b8f4b6d54cd5d24

commit r15-9622-g169ad482497ae9c672a825050b8f4b6d54cd5d24
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Apr 30 10:01:47 2025 +0200

    ipa/120006 - wrong code with IPA PTA

    When PTA gets support for special-handling more builtins in
    find_func_aliases the corresponding code in find_func_clobbers
    needs updating as well since for unhandled cases it assumes
    the former will populate ESCAPED accordingly.  The following
    fixes a few omissions, the testcase runs into the missing strdup
    handling.  I believe the more advanced handling using modref
    results and fnspecs opened a larger gap, the proper fix is to
    merge both functions, gating the clobber/use part on a parameter
    to avoid diverging.

            PR ipa/120006
            * tree-ssa-structalias.cc (find_func_clobbers): Handle
            strdup, strndup, realloc, index, strchr, strrchr, memchr,
            strstr, strpbrk builtins like find_func_aliases does.

            * gcc.dg/torture/pr120006.c: New testcase.

    (cherry picked from commit a85b89e26b1f50997701eb428c2dd71668f216ff)

Reply via email to