* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr62021.c
blob40c64429d6382821af4a31b3569c696ea0e5fa2a
1 /* { dg-require-effective-target vect_simd_clones } */
2 /* { dg-additional-options "-fopenmp-simd" } */
3 /* { dg-additional-options "-mavx" { target avx_runtime } } */
5 #include "tree-vect.h"
7 #pragma omp declare simd linear(y)
8 __attribute__((noinline)) int *
9 foo (int *x, int y)
11 return x + y;
14 int a[1024];
15 int *b[1024] = { &a[0] };
17 int
18 main ()
20 int i;
21 check_vect ();
22 for (i = 0; i < 1024; i++)
23 b[i] = &a[1023 - i];
24 #pragma omp simd
25 for (i = 0; i < 1024; i++)
26 b[i] = foo (b[i], i);
27 for (i = 0; i < 1024; i++)
28 if (b[i] != &a[1023])
29 __builtin_abort ();
30 return 0;