2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / run-id-pr67700-1.c
blobf1fae716c066a02cc9abedc51bac9bf2ad791d9a
1 #include <stdlib.h>
2 #include <assert.h>
4 struct type *obj;
5 struct type {
6 int elem1[81];
7 };
9 enum fpmath_unit
11 FPMATH_387 = 1,
12 FPMATH_SSE = 2
15 struct gcc_options
17 enum fpmath_unit x_ix86_fpmath;
20 struct gcc_options global_options;
22 void foo(void)
24 int pos = 0;
25 int i;
26 if (!((global_options.x_ix86_fpmath & FPMATH_SSE) != 0))
27 for (i = 8; i <= 15; i++)
28 (obj->elem1) [pos++] = i;
29 for (i = 45; i <= 52; i++)
30 (obj->elem1) [pos++] = i;
31 if (((global_options.x_ix86_fpmath & FPMATH_SSE) != 0))
32 for (i = 8; i <= 15; i++)
33 (obj->elem1) [pos++] = i;
34 for (i = 29; i <= 36; i++)
35 (obj->elem1) [pos++] = i;
38 int main()
40 int i;
41 obj = (struct type*) malloc (sizeof (struct type));
42 for (i = 0; i <= 80; i++)
43 obj->elem1[i] = 0;
44 foo();
45 assert (obj->elem1[8] == 45);
46 return 0;