https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125857
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <[email protected]>: https://gcc.gnu.org/g:b632956cd4154b3102a36675e0ee7375c9d8bb81 commit r17-1710-gb632956cd4154b3102a36675e0ee7375c9d8bb81 Author: Andrew Pinski <[email protected]> Date: Thu Jun 18 14:16:04 2026 -0700 ipa: Don't record return value ranges for pranges with non ipa-invariant [PR125857] Now that pranges can have invariants in it, we need to make sure the return value range does not record non-ipa invariants; otherwise we might prop the address of a local variable from one function to another. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/125857 gcc/ChangeLog: * ipa-prop.cc (ipa_record_return_value_range_1): Don't record pranges which have non ipa-invariants in it. gcc/testsuite/ChangeLog: * gcc.dg/pr125857-1.c: New test. Signed-off-by: Andrew Pinski <[email protected]>
