]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/graphite/run-id-pr67700.c
re PR tree-optimization/67700 ([graphite] miscompile due to wrong codegen)
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / graphite / run-id-pr67700.c
1 #include <stdlib.h>
2 #include <assert.h>
3
4 struct abc {
5 int a[81];
6 } *abcd;
7
8 #define FPMATH_SSE 2
9 int global;
10
11 void __attribute__ ((noinline)) foo()
12 {
13 int pos = 0;
14 int i;
15
16 if (!((global & FPMATH_SSE) != 0))
17 for (i = 8; i <= 15; i++)
18 abcd->a[pos++] = i;
19
20 for (i = 29; i <= 36; i++)
21 abcd->a[pos++] = i;
22 }
23
24 int main()
25 {
26 int i;
27 abcd = (struct abc*) malloc (sizeof (struct abc));
28 for (i = 0; i <= 80; i++)
29 abcd->a[i] = 0;
30
31 foo();
32
33 assert (abcd->a[8] == 29);
34
35 return 0;
36 }