https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108825
--- Comment #12 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:ae113080a9f98e807db239f3ad2157c64324542f commit r13-6138-gae113080a9f98e807db239f3ad2157c64324542f Author: Richard Biener <rguent...@suse.de> Date: Mon Feb 20 09:54:37 2023 +0100 tree-optimization/108825 - checking ICE with unroll-and-jam The issue is that unroll-and-jam applies RPO VN on the transformed body but that leaves the IL in "indetermined" state (it returns a TODO to make it valid again). But unroll-and-jam then continues to transform another loop and in using the tree_unroll_loop helper runs into tree_transform_and_unroll_loop performing IL checking on the whole function. While the real fix is to elide all such checking I'm only making the loop-local LC SSA verifier not perform function-wide SSA verification at this point. PR tree-optimization/108825 * tree-ssa-loop-manip.cc (verify_loop_closed_ssa): For loop-local verfication only verify there's no pending SSA update. * gcc.dg/torture/pr108825.c: New testcase.