https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112827
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:de0ab339a795352c843f6e9b2dfce222f26588de commit r14-6114-gde0ab339a795352c843f6e9b2dfce222f26588de Author: Richard Biener <rguent...@suse.de> Date: Mon Dec 4 10:46:11 2023 +0100 tree-optimization/112827 - corrupt SCEV cache during SCCP The following avoids corrupting the SCEV cache by my last change to propagate constant final values immediately. The easiest fix is to keep a dead initialization around. PR tree-optimization/112827 * tree-scalar-evolution.cc (final_value_replacement_loop): Do not release SSA name but keep a dead initialization around. * gcc.dg/torture/pr112827-1.c: New testcase. * gcc.dg/torture/pr112827-2.c: Likewise.