annotate gcc/testsuite/gcc.dg/pr40669.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR middle-end/40669 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-O2 -ffast-math" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 double _Complex
kono
parents:
diff changeset
6 test (int d, int t, double *x, double *y, double *z, int n,
kono
parents:
diff changeset
7 double _Complex (*fnp) (double))
kono
parents:
diff changeset
8 {
kono
parents:
diff changeset
9 int m = n / 2;
kono
parents:
diff changeset
10 double min = y[t], max = z[t], med = x[m * d + t];
kono
parents:
diff changeset
11 double _Complex result = 0.0;
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 if (n == 0)
kono
parents:
diff changeset
14 return 0.0;
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 if (min > med)
kono
parents:
diff changeset
17 result += test (d, (t + 1) % d, x + (m + 1) * d, y, z, n - m - 1, fnp);
kono
parents:
diff changeset
18 else if (max < med)
kono
parents:
diff changeset
19 result += test (d, (t + 1) % d, x, y, z, m, fnp);
kono
parents:
diff changeset
20 else
kono
parents:
diff changeset
21 {
kono
parents:
diff changeset
22 result += fnp (y[0] + x[m]);
kono
parents:
diff changeset
23 result += test (d, (t + 1) % d, x + (m + 1) * d, y, z, n - m - 1, fnp);
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 return result;
kono
parents:
diff changeset
26 }