mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Handle narrowing function sNaN test disabling based on argument format.
Testing narrowing functions for x86_64 with GCC 6 showed up a further testsuite fix needed: there is no _Float128 sNaN support before GCC 7 on x86_64 / x86, and the existing tests of SNAN_TESTS only checked it for the return type, not for the argument type. This patch fixes the code to check SNAN_TESTS (ARG_FLOAT) as well (in a variable set in libm-test-driver.c, since libm-test-support.c is compiled only once for each choice of FLOAT). Tested for x86_64 and x86 with GCC 6 in conjunction with the main patch adding narrowing add functions. * math/libm-test-driver.c (snan_tests_arg): New variable. * math/libm-test-support.h (snan_tests_arg): New declaration. * math/libm-test-support.c (enable_test): Check snan_tests_arg.
This commit is contained in:
@ -27,6 +27,12 @@ const int flag_test_finite = TEST_FINITE;
|
||||
const int flag_test_inline = TEST_INLINE;
|
||||
const int flag_test_mathvec = TEST_MATHVEC;
|
||||
|
||||
#if TEST_NARROW
|
||||
const int snan_tests_arg = SNAN_TESTS (ARG_FLOAT);
|
||||
#else
|
||||
const int snan_tests_arg = SNAN_TESTS (FLOAT);
|
||||
#endif
|
||||
|
||||
#define STRX(x) #x
|
||||
#define STR(x) STRX (x)
|
||||
#define STR_FLOAT STR (FLOAT)
|
||||
|
Reference in New Issue
Block a user