aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20170419-1.c
blob: c16a5ea2af4bd058bd23fd10ee9aaa4157f0103d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
extern int __fpclassifyd (double x);

double fdim (double x, double y)
{
   int c = __fpclassifyd (x);
   if (c == 0)
     return (x);
   if (__fpclassifyd (y) == 0)
     return (y);
   if (c == 1)
     return (__builtin_huge_val ());
   return x > y ? x - y : 0.0;
}