https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120006
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:a85b89e26b1f50997701eb428c2dd71668f216ff commit r16-304-ga85b89e26b1f50997701eb428c2dd71668f216ff 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.