| 1 |
/* { dg-additional-options "-ffast-math -fno-unsafe-math-optimizations" } */ |
| 2 |
|
| 3 |
#include "tree-vect.h" |
| 4 |
|
| 5 |
double __attribute__((noipa)) |
| 6 |
foo (double *x, double *y, int n) |
| 7 |
{ |
| 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; |
| 15 |
} |
| 16 |
|
| 17 |
double y[16] = { 1., 1., 1., 1., 0., 1., 1., 1., |
| 18 |
1., 1., 1., 1., 1., 1., 1., 1. }; |
| 19 |
int main () |
| 20 |
{ |
| 21 |
check_vect (); |
| 22 |
if (foo (y, y, 16) != 64. + 11.) |
| 23 |
abort (); |
| 24 |
return 0; |
| 25 |
} |