libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr115723.c
blobb98b29d48702ba50b2de73cf10605dd5bf9e2fbc
1 /* { dg-additional-options "-ffast-math -fno-unsafe-math-optimizations" } */
3 #include "tree-vect.h"
5 double __attribute__((noipa))
6 foo (double *x, double *y, int n)
8 double res = 0.;
9 for (int i = 0; i < n; ++i)
10 if (y[i] > 0.)
11 res += x[i];
12 else
13 res = 64.;
14 return res;
17 double y[16] = { 1., 1., 1., 1., 0., 1., 1., 1.,
18 1., 1., 1., 1., 1., 1., 1., 1. };
19 int main ()
21 check_vect ();
22 if (foo (y, y, 16) != 64. + 11.)
23 abort ();
24 return 0;