aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr17390.c
blob: 3cf22e6d0bd33f1f6dd17e14077db86f7838bcd6 (plain)
1
2
3
4
5
6
7
8
9
10
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -ffast-math" } */

double sgn (double __x)
{
  return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0);
}

/* { dg-final { scan-assembler-times "fnstsw" 1 } } */