cfgexpand: Expand comment on when non-var clobbers can show up
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr64421.c
blob47afd22d93e5ed8fbfff034cd2a03d8d70f7e422
1 /* PR middle-end/64421 */
2 /* { dg-require-effective-target vect_simd_clones } */
3 /* { dg-additional-options "-fopenmp-simd" } */
4 /* { dg-additional-options "-mavx" { target avx_runtime } } */
6 #include "tree-vect.h"
8 #pragma omp declare simd linear (y) notinbranch
9 int foo (int x, int y) __asm ("bar");
11 #pragma omp declare simd linear (y) notinbranch
12 int
13 foo (int x, int y)
15 return x + y;
18 int a[1024] = { 1, 2 };
20 int
21 main ()
23 int i;
24 check_vect ();
25 #pragma omp simd
26 for (i = 0; i < 1024; i++)
27 a[i] = foo (a[i], i);
28 if (a[0] != 1 || a[1] != 3)
29 abort ();
30 #pragma GCC novector
31 for (i = 2; i < 1024; i++)
32 if (a[i] != i)
33 abort ();
34 return 0;