From: Kaveh R. Ghazi Date: Sun, 8 Jul 2007 20:32:11 +0000 (+0000) Subject: c99-math-double-1.c, [...]: Test subnormals. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff21d67852aaf8b4f15bf9e64b1908ddc7af5301;p=thirdparty%2Fgcc.git c99-math-double-1.c, [...]: Test subnormals. * gcc.dg/c99-math-double-1.c, gcc.dg/c99-math-float-1.c, c99-math-long-double-1.c, c99-math.h: Test subnormals. From-SVN: r126465 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b9c02803686..abd5a0c658d1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-07-08 Kaveh R. Ghazi + + * gcc.dg/c99-math-double-1.c, gcc.dg/c99-math-float-1.c, + c99-math-long-double-1.c, c99-math.h: Test subnormals. + 2007-07-06 Uros Bizjak PR rtl-optimization/32450 diff --git a/gcc/testsuite/gcc.dg/c99-math-double-1.c b/gcc/testsuite/gcc.dg/c99-math-double-1.c index 54bdf60dfe77..ef11d1ba3173 100644 --- a/gcc/testsuite/gcc.dg/c99-math-double-1.c +++ b/gcc/testsuite/gcc.dg/c99-math-double-1.c @@ -10,9 +10,10 @@ int main(void) double inf = INFINITY; double huge = HUGE_VAL; double norm = __DBL_MIN__; + double sub = __DBL_MIN__ / 2; double zero = 0.0; - C99_MATH_TESTS (nan, inf, huge, norm, zero) + C99_MATH_TESTS (nan, inf, huge, norm, sub, zero) return 0; } diff --git a/gcc/testsuite/gcc.dg/c99-math-float-1.c b/gcc/testsuite/gcc.dg/c99-math-float-1.c index ba27a710bdef..f377c1af5b8f 100644 --- a/gcc/testsuite/gcc.dg/c99-math-float-1.c +++ b/gcc/testsuite/gcc.dg/c99-math-float-1.c @@ -10,9 +10,10 @@ int main(void) float inf = INFINITY; float huge = HUGE_VALF; float norm = __FLT_MIN__; + float sub = __FLT_MIN__ / 2; float zero = 0.0f; - C99_MATH_TESTS (nan, inf, huge, norm, zero) + C99_MATH_TESTS (nan, inf, huge, norm, sub, zero) return 0; } diff --git a/gcc/testsuite/gcc.dg/c99-math-long-double-1.c b/gcc/testsuite/gcc.dg/c99-math-long-double-1.c index a8fa4d21fc12..5f1cd3097d34 100644 --- a/gcc/testsuite/gcc.dg/c99-math-long-double-1.c +++ b/gcc/testsuite/gcc.dg/c99-math-long-double-1.c @@ -10,9 +10,10 @@ int main(void) long double inf = INFINITY; long double huge = HUGE_VALL; long double norm = __LDBL_MIN__; + long double sub = __LDBL_MIN__ / 2; long double zero = 0.0l; - C99_MATH_TESTS (nan, inf, huge, norm, zero) + C99_MATH_TESTS (nan, inf, huge, norm, sub, zero) return 0; } diff --git a/gcc/testsuite/gcc.dg/c99-math.h b/gcc/testsuite/gcc.dg/c99-math.h index 2f3054ddd567..aff81b319ca6 100644 --- a/gcc/testsuite/gcc.dg/c99-math.h +++ b/gcc/testsuite/gcc.dg/c99-math.h @@ -2,7 +2,7 @@ extern void abort(void); -#define C99_MATH_TESTS(nan, inf, huge, norm, zero) \ +#define C99_MATH_TESTS(nan, inf, huge, norm, sub, zero) \ { \ if (fpclassify (nan) != FP_NAN) \ abort (); \ @@ -16,6 +16,9 @@ extern void abort(void); if (fpclassify (norm) != FP_NORMAL) \ abort (); \ \ + if (fpclassify (sub) != FP_SUBNORMAL) \ + abort (); \ + \ if (fpclassify (zero) != FP_ZERO) \ abort (); \ \ @@ -32,6 +35,9 @@ extern void abort(void); if (isnan (norm)) \ abort (); \ \ + if (isnan (sub)) \ + abort (); \ + \ if (isnan (zero)) \ abort (); \ \ @@ -48,6 +54,9 @@ extern void abort(void); if (isinf (norm)) \ abort (); \ \ + if (isinf (sub)) \ + abort (); \ + \ if (isinf (zero)) \ abort (); \ \ @@ -64,6 +73,9 @@ extern void abort(void); if (!isfinite (norm)) \ abort (); \ \ + if (!isfinite (sub)) \ + abort (); \ + \ if (!isfinite (zero)) \ abort (); \ \ @@ -80,6 +92,9 @@ extern void abort(void); if (!isnormal (norm)) \ abort (); \ \ + if (isnormal (sub)) \ + abort (); \ + \ if (isnormal (zero)) \ abort (); \ \