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

--- Comment #7 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:75bbfaeb8ba0ad95e7c0fb306790ca71dbb55bbd

commit r17-5877-g75bbfaeb8ba0ad95e7c0fb306790ca71dbb55bbd
Author: Martin Jambor <[email protected]>
Date:   Tue Nov 3 10:41:34 2026 +0100

    ipa-sra: Check that index of a formal parameter fits unsigned char
(PR128106)

    PR 128106 revealed that only two of the three places that need to
    check that the index of a formal parameter (among the parameters of
    the the caller function) is small enough to fit unsigned char, one
    did not do so.  The indices are stored as unsigned char because the
    array that holds as many as 7 of them is stored per each argument of
    each call and so we want to keep it small.  The fix is to add the
    missing check.

    gcc/ChangeLog:

    2026-10-26  Martin Jambor  <[email protected]>

            PR ipa/128106
            * ipa-sra.cc (scan_expr_access): Add a check that the formal
parameter
            being passed in a call has index fitting an unsigned char.

    gcc/testsuite/ChangeLog:

    2026-10-26  Martin Jambor  <[email protected]>

            PR ipa/128106
            * g++.dg/ipa/pr128106.C: New test.

Reply via email to