diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-07-18 20:22:32 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-07-18 20:22:32 +0000 |
commit | dadda6caba15b21a03e9522ca5cce41e2c2d270b (patch) | |
tree | cbf2a3e15dd08f11a41d46289515a304aec79ed0 /gcc/testsuite/gcc.dg/c99-math-float-1.c | |
parent | 2a48b790b26895fd7fb56c9ce1d64f083dd278bb (diff) | |
download | gcc-dadda6caba15b21a03e9522ca5cce41e2c2d270b.zip gcc-dadda6caba15b21a03e9522ca5cce41e2c2d270b.tar.gz gcc-dadda6caba15b21a03e9522ca5cce41e2c2d270b.tar.bz2 |
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
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-math-float-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-math-float-1.c | 17 |
1 files changed, 10 insertions, 7 deletions
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; } |