From dadda6caba15b21a03e9522ca5cce41e2c2d270b Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 18 Jul 2007 20:22:32 +0000 Subject: re PR target/32641 (C99 fpclassify, isinf, isfinite, isnormal may raise FP exceptions) fixincludes: PR target/32641 * inclhack.def (solaris_math_4, solaris_math_5, solaris_math_6, solaris_math_7): Constify and make FP exception-safe. * tests/base/iso/math_c99.h: Update. * fixincl.x: Regenerate. gcc/testsuite: * gcc.dg/c99-math-double-1.c: Mark test variables as volatile. Test negative numbers also. * gcc.dg/c99-math-float-1.c: Likewise. * gcc.dg/c99-math-long-double-1.c: Likewise. * gcc.dg/c99-math.h: Check for FP exceptions. Update for negative test inputs. From-SVN: r126730 --- gcc/testsuite/gcc.dg/c99-math-float-1.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gcc/testsuite/gcc.dg/c99-math-float-1.c') diff --git a/gcc/testsuite/gcc.dg/c99-math-float-1.c b/gcc/testsuite/gcc.dg/c99-math-float-1.c index f377c1a..36a7396 100644 --- a/gcc/testsuite/gcc.dg/c99-math-float-1.c +++ b/gcc/testsuite/gcc.dg/c99-math-float-1.c @@ -6,14 +6,17 @@ int main(void) { - float nan = NAN; - float inf = INFINITY; - float huge = HUGE_VALF; - float norm = __FLT_MIN__; - float sub = __FLT_MIN__ / 2; - float zero = 0.0f; + volatile float nan = NAN; + volatile float inf = INFINITY; + volatile float huge = HUGE_VALF; + volatile float norm1 = __FLT_MIN__; + volatile float norm2 = 1; + volatile float norm3 = __FLT_MAX__; + volatile float sub = __FLT_MIN__ / 2; + volatile float zero = 0.0f; - C99_MATH_TESTS (nan, inf, huge, norm, sub, zero) + C99_MATH_TESTS (nan, inf, huge, norm1, norm2, norm3, sub, zero, /*neg=*/0) + C99_MATH_TESTS (-nan, -inf, -huge, -norm1, -norm2, -norm3, -sub, -zero, /*neg=*/1) return 0; } -- cgit v1.1