http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50637
Bug #: 50637 Summary: gcc.dg/vect/vect-align-2.c is invalid (FAILs with -O2 -flto -fpeel-loops) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz CC: do...@gcc.gnu.org The testcase accesses an array out of bounds, causing a testsuite failure with nondefault flags: $ gcc gcc.dg/vect/vect-align-2.c -O2 -flto -fpeel-loops $ ./a.out Aborted The problem is: ... #define N 17 ... int z[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; ... for (i=0; i<N; i++) for (j=0; j<N; j++) f2.y[i][j] = z[i]; for (i=0; i<N; i++) for (j=0; j<N; j++) if (f2.y[i][j] != z[i]) abort (); ... z[16] is read out of bounds. vect-align-1.c uses: int x[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; what might be a better solution