The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112918 The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64. The patch affects a sensitive part of LRA.  So I will monitor that the commit does not create serious failures on other targets. If it happens, I probably revert the patch.