libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr61680.c
blobbb24014bdf045f22a0c9c5234481f07153c25d41
2 #include "tree-vect.h"
4 double v[4096][4];
6 __attribute__((noinline, noclone)) void
7 bar (double p[][4])
9 int i;
10 double d = 172.0;
11 #pragma GCC novector
12 for (i = 0; i < 4096; i++)
14 if (p[i][0] != 6.0 || p[i][1] != 6.0 || p[i][2] != 10.0)
15 __builtin_abort ();
16 if (__builtin_fabs (p[i][3] - d) > 0.25)
17 __builtin_abort ();
21 __attribute__((noinline, noclone)) void
22 foo (void)
24 int i;
25 double w[4096][4], t;
26 for (i = 0; i < 4096; i++)
28 w[i][0] = v[i][0] + 2.0;
29 w[i][1] = v[i][1] + 1.0;
30 w[i][2] = v[i][2] + 4.0;
31 w[i][3] = (w[i][0] * w[i][0] + w[i][1] * w[i][1] + w[i][2] * w[i][2]);
33 bar (w);
36 int
37 main ()
39 int i;
41 check_vect ();
43 for (i = 0; i < 4096; i++)
45 v[i][0] = 4.0;
46 v[i][1] = 5.0;
47 v[i][2] = 6.0;
49 foo ();
50 return 0;