[Bug ipa/123629] [16 regression] ICE seg fault in ipcp_val_replacement_ok_p when building clang-21.1.8

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 24 10:44:44 GMT 2026


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 <jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:a8150eea4e228a387305714554071cf10a6f180f

commit r16-7656-ga8150eea4e228a387305714554071cf10a6f180f
Author: Martin Jambor <mjambor@suse.cz>
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  <mjambor@suse.cz>

            PR ipa/123629
            * ipa-cp.cc (ipcp_val_replacement_ok_p): Also verify that the
            vector of known contexts has sufficient length.


More information about the Gcc-bugs mailing list