http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56918
Bug #: 56918
Summary: incorrect auto-vectorization of array initialization
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Compile the following testcase with "gcc -m32 -O2 -ftree-vectorize -msse2"
int main() {
double data[4];
for (int i = 0; i < 2 * 2; ++i) {
data[i] = ((i + 2) % 3) + 1;
}
if (data[0] != 3.) {
return 1;
}
return 0;
}
The first for-loop calculates the values 6, 7, 8, 9 instead of the expected 3,
1, 2, 3.