https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122856
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Martin Jambor <[email protected]>: https://gcc.gnu.org/g:ddccaad7202fdacc6c82b31d2cde889f0ce17e09 commit r15-10879-gddccaad7202fdacc6c82b31d2cde889f0ce17e09 Author: Martin Jambor <[email protected]> Date: Fri Feb 20 14:34:27 2026 +0100 ipa-cp: Also look at self-recursive ancestor jump functions (PR122856) PR 122856 shows that when looking at self recursive calls with self-feeding jump functions, we did consider pass-through functions but not ancestor functions with zero offsets. This then leads to the fact that constants which were collected from IPA-CP lattices were not among those collected from available edges, triggering a verification assert. This patch fixes that by also detecting self-feeding ancestor jump functions. gcc/ChangeLog: 2026-02-06 Martin Jambor <[email protected]> PR ipa/122856 * ipa-cp.cc (self_recursive_pass_through_p): Test jump function type first. (self_recursive_ancestor_p): New function. (find_scalar_values_for_callers_subset): Test also for self-recursive ancestor jump functions. (push_agg_values_for_index_from_edge): Likewise. gcc/testsuite/ChangeLog: 2026-02-06 Martin Jambor <[email protected]> PR ipa/122856 * g++.dg/ipa/pr122856.C: New test. (cherry picked from commit e47f44074a5fe9b51cbe75269363a42e90d6a580)
