1115926Sgrog/* { dg-do compile } */ 2115926Sgrog/* { dg-options "-O2 -ffast-math -mfpmath=387" } */ 3115926Sgrog 4115926Sgrogdouble sgn (double __x) 5115926Sgrog{ 6115926Sgrog return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); 7115926Sgrog} 8115926Sgrog 9115926Sgrog/* { dg-final { scan-assembler-times "fcom|ftst" 1 } } */ 10115926Sgrog