vect: Fix vect_reduction_def check for odd/even widen mult [PR116142]
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr85989.c
blob4dff5e69089180d0f712b7801f4270c0763381f8
1 /* { dg-do run } */
3 #define N 9
5 void __attribute__((noipa))
6 f (double x, double y, double *res)
8 y = -y;
9 for (int i = 0; i < N; ++i)
11 double tmp = y;
12 y = x;
13 x = tmp;
14 res[i] = i;
16 res[N] = y * y;
17 res[N + 1] = x;
20 int
21 main (void)
23 double res[N + 2];
24 f (10, 20, res);
25 for (int i = 0; i < N; ++i)
26 if (res[i] != i)
27 __builtin_abort ();
28 if (res[N] != 100 || res[N + 1] != -20)
29 __builtin_abort ();
30 return 0;