OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr36017.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR rtl-optimization/36017 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
 
5
extern double sqrt (double);
6
extern void abort (void);
7
 
8
__attribute__((noinline)) double
9
foo (double a)
10
{
11
  double b, c, d = 0.7;
12
  if (a <= d)
13
    b = sqrt (d * a);
14
  else
15
    {
16
      c = (1.0 - d) * (1.0 - a);
17
      b = c > 0 ? 1.0 - sqrt (c) : 1.0;
18
    }
19
  return b;
20
}
21
 
22
int
23
main (void)
24
{
25
  double c = foo (0.5);
26
  if (c > 0.5917)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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