LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-simd-clone-4.c
blobdebbe77b79d3ffd58eed797f23c367537b41f01a
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 #ifndef N
8 #define N 1024
9 #endif
11 float d[N];
12 int e[N];
13 unsigned short f[N];
15 #pragma omp declare simd simdlen(8) notinbranch uniform(b)
16 __attribute__((noinline)) float
17 foo (float a, float b, float c)
19 if (a < 30)
20 return 5.0f;
21 return a + b + c;
24 __attribute__((noinline, noclone)) void
25 bar ()
27 int i;
28 #pragma omp simd
29 for (i = 0; i < N; ++i)
31 d[i] = foo (i, 123, i * 3);
32 e[i] = e[i] * 3;
33 f[i] = f[i] + 1;
37 int
38 main ()
40 int i;
41 check_vect ();
42 bar ();
43 for (i = 0; i < N; i++)
44 if (d[i] != (i < 30 ? 5.0f : i * 4 + 123.0f) || e[i] || f[i] != 1)
45 abort ();
46 return 0;