OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr40669.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR middle-end/40669 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -ffast-math" } */
4
 
5
double _Complex
6
test (int d, int t, double *x, double *y, double *z, int n,
7
      double _Complex (*fnp) (double))
8
{
9
  int m = n / 2;
10
  double min = y[t], max = z[t], med = x[m * d + t];
11
  double _Complex result = 0.0;
12
 
13
  if (n == 0)
14
    return 0.0;
15
 
16
  if (min > med)
17
    result += test (d, (t + 1) % d, x + (m + 1) * d, y, z, n - m - 1, fnp);
18
  else if (max < med)
19
    result += test (d, (t + 1) % d, x, y, z, m, fnp);
20
  else
21
    {
22
      result += fnp (y[0] + x[m]);
23
      result += test (d, (t + 1) % d, x + (m + 1) * d, y, z, n - m - 1, fnp);
24
    }
25
  return result;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.