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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |ipa
   Last reconfirmed|                            |2026-12-03
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed on trunk x86_64. In
gcc/ipa-fnsummary.cc:points_to_local_or_readonly_memory_p, 'if (integer_zerop
(t)) return flag_delete_null_pointer_checks;' treats any zero pointer as
local/invalid memory without checking targetm.addr_space.zero_address_valid for
the address space. Consequently, local-pure-const marks copy() as const, and
the store is eliminated as dead code.

Reply via email to