This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/50637] New: gcc.dg/vect/vect-align-2.c is invalid (FAILs with -O2 -flto -fpeel-loops)
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Oct 2011 18:29:14 +0000
- Subject: [Bug testsuite/50637] New: gcc.dg/vect/vect-align-2.c is invalid (FAILs with -O2 -flto -fpeel-loops)
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
CC: dorit@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