https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112585
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. In .optimized all loops are unrolled and we have e.0_103 = e; _105 = (int) e.0_103; a[2] = _105; ... _7 = a[2]; if (_7 != 1) goto <bb 3>; [0.00%] else goto <bb 4>; [100.00%] <bb 3> [count: 0]: __builtin_abort (); loop distribution splits the loop, putting a loop with just a[f] = 1 first. I think that's wrong. Related to PR112281, here we have a zero distance for the inner loop.