https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116747
--- Comment #26 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:053a6bfc407be8de6099bad82204cef02854aa6b commit r15-10965-g053a6bfc407be8de6099bad82204cef02854aa6b Author: Richard Biener <[email protected]> Date: Thu Jan 29 08:47:44 2026 +0100 tree-optimization/116747 - ICE in cselim due to duplicate sinking The following avoids queueing duplicate stmts in the set of sinkings to consider as well as pick candidates in an order that ensures we don't unnecessarily re-order stores. While we currently only can trigger the ICE with out-of-bound accesses future enhancements to how we deal with dependence analysis in this pass could expose the issue to a wider range of testcases, so this makes it future-proof. PR tree-optimization/116747 * tree-ssa-phiopt.cc (cond_if_else_store_replacement): Avoid duplicate stmts in the set of store pairs to process. * gcc.dg/tree-ssa/cselim-4.c: New testcase. (cherry picked from commit 312ba8d740bb4302a038e11c45891addf0c7e9f9)
