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

--- Comment #6 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:5958e61d12f21cead59e6cdaa592ac648e6f6add

commit r17-1365-g5958e61d12f21cead59e6cdaa592ac648e6f6add
Author: Andrew Pinski <[email protected]>
Date:   Fri Jun 5 00:43:28 2026 -0700

    Fix EXECUTE_IF_SET_IN_HARD_REG_SET usage in rtl-ssa/insns.cc [PR122992]

    r17-1279-gf6103f3a1e42fe had a mistake when converting over to use
    EXECUTE_IF_SET_IN_HARD_REG_SET. EXECUTE_IF_SET_IN_HARD_REG_SET does not
work
    with a temporary as that temporary lifetime will end after the
initialization
    part of the for loop ends. So the variable becomes garbage or in some cases
    GCC will delete the needed stores.
    The fix is to create a variable to extend the liftime of that temporary and
    pass that to EXECUTE_IF_SET_IN_HARD_REG_SET.

    Pushed as obvious after a bootstrap on aarch64-linux-gnu which was failing
before.

            PR rtl-optimization/125609
            PR middle-end/122992
    gcc/ChangeLog:

            * rtl-ssa/insns.cc (function_info::record_call_clobbers): Use a
            variable to store out the result of abi.full_reg_clobbers().

    Signed-off-by: Andrew Pinski <[email protected]>

Reply via email to