https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123629
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Jambor <[email protected]>: https://gcc.gnu.org/g:a8150eea4e228a387305714554071cf10a6f180f commit r16-7656-ga8150eea4e228a387305714554071cf10a6f180f Author: Martin Jambor <[email protected]> Date: Tue Feb 24 11:43:32 2026 +0100 ipa-cp: Make ipcp_val_replacement_ok_p fail better This is a small improvement to a function which verifies that the polymorphic context IPA-CP has decided to clone for is indeed among the known contexts collected for the specialized node. When no context has been collected and the vector is empty, like in the case of PR123629, the function will return false rather than ICE because of an out of bounds vector access. That in turn also results in an ICE, but hopefully the error will be somewhat clearer. gcc/ChangeLog: 2026-02-23 Martin Jambor <[email protected]> PR ipa/123629 * ipa-cp.cc (ipcp_val_replacement_ok_p): Also verify that the vector of known contexts has sufficient length.
