libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr56918.c
blob4941453bbe9940b4e775239c4c2c9606435ea20a
1 /* PR tree-optimization/56918 */
2 /* { dg-additional-options "-O3" } */
4 #include "tree-vect.h"
6 extern void abort (void);
7 double data[8];
9 __attribute__((noinline, noclone)) void
10 foo ()
12 int i;
13 for (i = 0; i < 8; ++i)
14 data[i] = ((i + 2) % 3) + 1;
17 int
18 main ()
20 int i;
21 check_vect ();
22 foo ();
23 if (data[0] != 3 || data[7] != 1)
24 abort ();
25 #pragma GCC novector
26 for (i = 1; i < 4; ++i)
27 if (data[i] != i || data[i + 3] != i)
28 abort ();
29 return 0;