https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123994
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:c93f760922f767f385eeb5bc0d0942cce47dfb27 commit r16-7609-gc93f760922f767f385eeb5bc0d0942cce47dfb27 Author: Jeff Law <[email protected]> Date: Sat Feb 21 11:49:11 2026 -0700 [PR rtl-optimization/123994] Bullet-proof RTL-SSA loop to determine insertion location As discussed in the PR, there's two things we want to do WRT this bug. First, we want to bullet-proof this loop. It's trying to find an insertion point, but can run off the end of the insn chain in the process. That's enough to fix the regression and the purpose of this patch. For gcc-17 Richard S. has a more invasive change which fixes the underlying cause of walking off the end of the insn chain. This patch has the potential to trigger more combinations which in turn could trip over latent bugs, so we agreed to defer that fix until the gcc-17 cycle out of an abundance of caution. My fix has been bootstrapped and regression tested on x86. Pushing to the trunk. PR rtl-optimization/123994 gcc/ * rtl-ssa/changes.cc (function_info::verify_insn_changes): Bullet proof loop to not fault if we run off the end of the insn chain. gcc/testsuite/ * gcc.dg/torture/pr123994.c: New test.
