LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr56933.c
blob7206682d7935a0436aaf502537bb56642d5e4648
1 /* { dg-require-effective-target vect_double } */
3 #include "tree-vect.h"
5 extern void abort (void);
6 void __attribute__((noinline,noclone))
7 foo (double *b, double *d, double *f)
9 int i;
10 for (i = 0; i < 1024; i++)
12 d[2*i] = 2. * d[2*i];
13 d[2*i+1] = 4. * d[2*i+1];
14 b[i] = d[2*i] - 1.;
15 f[i] = d[2*i+1] + 2.;
18 int main()
20 double b[1024], d[2*1024], f[1024];
21 int i;
23 check_vect ();
25 for (i = 0; i < 2*1024; i++)
26 d[i] = 1.;
27 foo (b, d, f);
28 for (i = 0; i < 1024; i+= 2)
30 if (d[2*i] != 2.)
31 abort ();
32 if (d[2*i+1] != 4.)
33 abort ();
35 for (i = 0; i < 1024; i++)
37 if (b[i] != 1.)
38 abort ();
39 if (f[i] != 6.)
40 abort ();
42 return 0;