https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113787
--- Comment #24 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:0b7ec50ae2959153650c0b3dc134c8872ff9fcfc commit r14-10456-g0b7ec50ae2959153650c0b3dc134c8872ff9fcfc Author: Jan Hubicka <j...@suse.cz> Date: Thu May 16 15:33:55 2024 +0200 Fix points_to_local_or_readonly_memory_p wrt TARGET_MEM_REF TARGET_MEM_REF can be used to offset constant base into a memory object (to produce lea instruction). This confuses points_to_local_or_readonly_memory_p which treats the constant address as a base of the access. Bootstrapped/regtsted x86_64-linux, comitted. Honza gcc/ChangeLog: PR ipa/113787 * ipa-fnsummary.cc (points_to_local_or_readonly_memory_p): Do not look into TARGET_MEM_REFS with constant opreand 0. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/pr113787.c: New test. (cherry picked from commit 96d53252aefcbc2fe419c4c3b4bcd3fc03d4d187)