https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- Btw, i = N; if (i > 0) { do { *pout++ = *pin++ + a; *pout++ = *pin++ + a; *pout++ = *pin++ + a; *pout++ = *pin++ + a; *pout++ = *pin++ + a; *pout++ = *pin++ + a; *pout++ = *pin++ + a; *pout++ = *pin++ + a; if (arr[i] = i) a = i; else a = 2; } while (i < N); that was obviously bogus - you wanted if (N > 0) and initialize i to zero ...