aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr56125.c
blob: d1840a9a059922b5863cb711f49c57d4742ee421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR tree-optimization/56125 */
/* { dg-do run } */
/* { dg-options "-O2 -ffast-math" } */

extern void abort (void);
extern double fabs (double);

__attribute__((cold)) double
foo (double x, double n)
{
  double u = x / (n * n);
  return u;
}

int
main ()
{
  if (fabs (foo (29, 2) - 7.25) > 0.001)
    abort ();
  return 0;
}