mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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 <float.h>. [!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG > DBL_MANT_DIG]. * math/test-tgmath2.c: Include <float.h>. [!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG > DBL_MANT_DIG].
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#ifndef HAVE_MAIN
|
||||
#undef __NO_MATH_INLINES
|
||||
#define __NO_MATH_INLINES 1
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@ -30,7 +31,7 @@
|
||||
|
||||
static void compile_test (void);
|
||||
static void compile_testf (void);
|
||||
#ifndef NO_LONG_DOUBLE
|
||||
#if LDBL_MANT_DIG > DBL_MANT_DIG
|
||||
static void compile_testl (void);
|
||||
#endif
|
||||
|
||||
@ -135,7 +136,7 @@ do_test (void)
|
||||
result = 1;
|
||||
}
|
||||
|
||||
#ifndef NO_LONG_DOUBLE
|
||||
#if LDBL_MANT_DIG > DBL_MANT_DIG
|
||||
count_float = count_double = count_ldouble = 0;
|
||||
count_cfloat = count_cdouble = count_cldouble = 0;
|
||||
compile_testl ();
|
||||
@ -200,7 +201,7 @@ do_test (void)
|
||||
#define ccount count_cfloat
|
||||
#include "test-tgmath.c"
|
||||
|
||||
#ifndef NO_LONG_DOUBLE
|
||||
#if LDBL_MANT_DIG > DBL_MANT_DIG
|
||||
#define F(name) name##l
|
||||
#define TYPE long double
|
||||
#define x lx
|
||||
|
Reference in New Issue
Block a user