https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120424
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alexandre Oliva <aol...@gcc.gnu.org>: https://gcc.gnu.org/g:ccef9e5dd9ffde563f415f0b7117b48537c8e57d commit r16-1723-gccef9e5dd9ffde563f415f0b7117b48537c8e57d Author: Alexandre Oliva <ol...@adacore.com> Date: Thu Jun 26 21:01:27 2025 -0300 [lra] apply elimination offsets to MEM in autoinc address [PR120424] When attempting to bootstrap arm-linux-gnueabihf with {BOOT_C,T}FLAGS='-g -O2 -fnon-call-exceptions -fstack-clash-protection', gmp fails to build in stage2: gen-fac's mpz_and gets miscompiled. A pseudo is initialized before a loop and used in a PRE_INC load inside a loop. It gets spilled just as the fp2sp elimination is disabled, and only the initialization gets adjusted with elimination offsets. The unadjusted stack slot within the PRE_INC load ends up reloaded later, but only when the FP offset has already missed its chance to be adjusted. Arrange for lra_eliminate_regs_1 to adjust autoinc addresses that are MEMs themselves. for gcc/ChangeLog PR rtl-optimization/120424 * lra-eliminations.cc (lra_eliminate_regs_1): Adjust autoinc addresses that are MEMs.