From 51737193a9810ceb1c516a2a71444fa70bcf8500 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 28 Jun 2017 16:01:20 +0000 Subject: Remove NO_LONG_DOUBLE conditionals in libm tests (bug 21607). As noted in bug 21607, NO_LONG_DOUBLE conditionals in libm tests are no longer effective. For most this is harmless - they were only present because of long double functions not being declared with _LIBC defined, and _LIBC is no longer defined for building most tests. For the few where this is actually relevant to the test, testing LDBL_MANT_DIG > DBL_MANT_DIG is more appropriate as that limits the test to public APIs. This patch fixes the tests accordingly. Tested for x86_64 and arm. [BZ #21607] * math/basic-test.c [!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG > DBL_MANT_DIG]. * math/bug-nextafter.c [!NO_LONG_DOUBLE]: Remove conditionals. * math/bug-nexttoward.c [!NO_LONG_DOUBLE]: Likewise. * math/test-math-isinff.cc [!NO_LONG_DOUBLE]: Likewise. * math/test-math-iszero.cc [!NO_LONG_DOUBLE]: Likewise. * math/test-nan-overflow.c [!NO_LONG_DOUBLE]: Likewise. * math/test-nan-payload.c [!NO_LONG_DOUBLE]: Likewise. * math/test-nearbyint-except-2.c [!NO_LONG_DOUBLE]: Likewise. * math/test-nearbyint-except.c [!NO_LONG_DOUBLE]: Likewise. * math/test-powl.c [!NO_LONG_DOUBLE]: Likewise. * math/test-signgam-finite-c99.c [!NO_LONG_DOUBLE]: Likewise. * math/test-signgam-finite.c [!NO_LONG_DOUBLE]: Likewise. * math/test-signgam-main.c [!NO_LONG_DOUBLE]: Likewise. * math/test-snan.c [!NO_LONG_DOUBLE]: Likewise. * math/test-tgmath-ret.c [!NO_LONG_DOUBLE]: Likewise. * math/test-tgmath.c: Include . [!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG > DBL_MANT_DIG]. * math/test-tgmath2.c: Include . [!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG > DBL_MANT_DIG]. --- math/basic-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'math/basic-test.c') diff --git a/math/basic-test.c b/math/basic-test.c index 43badbc6aa..f17d374ade 100644 --- a/math/basic-test.c +++ b/math/basic-test.c @@ -191,7 +191,7 @@ TEST_FUNC (float_test, float, f, FLT_EPSILON, HUGE_VALF) TEST_FUNC (double_test, double, , DBL_EPSILON, HUGE_VAL) TEST_CONVERT (convert_dfsf_test, float, double, ) TEST_CONVERT (convert_sfdf_test, double, float, f) -#ifndef NO_LONG_DOUBLE +#if LDBL_MANT_DIG > DBL_MANT_DIG TEST_FUNC (ldouble_test, long double, l, LDBL_EPSILON, HUGE_VALL) TEST_CONVERT (convert_tfsf_test, float, long double, l) TEST_CONVERT (convert_sftf_test, long double, float, f) @@ -207,7 +207,7 @@ do_test (void) convert_dfsf_test(); convert_sfdf_test(); -#ifndef NO_LONG_DOUBLE +#if LDBL_MANT_DIG > DBL_MANT_DIG ldouble_test (); convert_tfsf_test(); convert_sftf_test(); -- cgit v1.2.3