https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125477
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:bfac2983b69f6cc6631aa7bfd1058eed37d7a425 commit r17-1245-gbfac2983b69f6cc6631aa7bfd1058eed37d7a425 Author: Richard Biener <[email protected]> Date: Tue Jun 2 15:41:07 2026 +0200 tree-optimization/125477 - verify we can copy it before versioning an outer loop The following fixes a hole in vectorizer loop versioning which tries to version an outer loop that the versioning condition is invariant in but fails to verify we can actually copy it. PR tree-optimization/125477 * tree-vect-loop-manip.cc (vect_loop_versioning): Verify we can duplicate an outer loop before considering to version it. * gcc.dg/torture/pr125477.c: New testcase.
