https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112767
--- Comment #4 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:2dde9f326ded84814a78c3044294b535c1f97b41 commit r14-6010-g2dde9f326ded84814a78c3044294b535c1f97b41 Author: Richard Biener <rguent...@suse.de> Date: Thu Nov 30 12:38:53 2023 +0100 tree-optimization/112767 - spurious diagnostic after sccp/loop-split swap We are diagnosing an unreachable loop which we only manage to elide after the copyprop pass after sccp which leaves the code open for diagnosing by the intermittent ivcanon pass. The following makes sure to clean things up a bit earlier, propagating constant final values to uses immediately. PR tree-optimization/112767 * tree-scalar-evolution.cc (final_value_replacement_loop): Propagate constants to immediate uses immediately. * gcc.dg/tree-ssa/pr112767.c: New testcase. * gcc.dg/graphite/pr83255.c: Disable SCCP.