https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98552
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Yes, I think that translating a DO loop into something like int i; for (i=0; i<n; i++) { const int j = i; /* Use j from here on where i is referenced. */ } might solve a few of the issues in DO loop optimization.