https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111640
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- If we change the for loop to be: for (int i_0 = 0; i_0 < 4 + -1; i_0 += 1) Then it unswitches. Or just use -fwrapv which makes the undefined code to become defined.