https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115197
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:2a1fdd5fd0f6bc02d25da192c8fa6487d93d2d50 commit r14-10256-g2a1fdd5fd0f6bc02d25da192c8fa6487d93d2d50 Author: Richard Biener <rguent...@suse.de> Date: Thu May 23 14:36:39 2024 +0200 tree-optimization/115197 - fix ICE w/ constant in LC PHI and loop distribution Forgot a check for an SSA name before trying to replace a PHI arg with its current definition. PR tree-optimization/115197 * tree-loop-distribution.cc (copy_loop_before): Constant PHI args remain the same. * gcc.dg/pr115197.c: New testcase. (cherry picked from commit 2b2476d4d18c92b8aba3567ebccd2100c2f7c258)