http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52754
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-30
10:22:45 UTC ---
We indeed should not create negative array indices (well, out-of-bound array
indices). The issue why this happens is that we transform
const unsigned int * ii = (const unsigned int *) &indexes[i];
*(ii + 12)
to
MEM[(const unsigned int *)&indexes + 12B][i_3];
via
ii = &indexes[i];
D.3849 = ii + 12;
D.3850 = *D.3849;
forwprop1 (still ok):
ii_9 = &indexes[i_3];
D.3850_11 = MEM[(const unsigned int *)ii_9 + 12B];
forwprop2 (bogus):
D.3850_11 = MEM[(const unsigned int *)&indexes + 12B][i_3];