https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107865
--- Comment #2 from CVS 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:bcc2449384f2092cbdf5d6ac2357aeabe3212b2e commit r13-4295-gbcc2449384f2092cbdf5d6ac2357aeabe3212b2e Author: Richard Biener <rguent...@suse.de> Date: Fri Nov 25 08:27:42 2022 +0100 tree-optimization/107865 - ICE with outlining of loops The following makes sure to clear loops number of iterations when outlining them as part of a SESE region as can happen with auto-parallelization. The referenced SSA names become stale otherwise. PR tree-optimization/107865 * tree-cfg.cc (move_sese_region_to_fn): Free the number of iterations of moved loops. * gfortran.dg/graphite/pr107865.f90: New testcase.