view gcc/testsuite/gcc.dg/pr56125.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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;
}