aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-03-19 10:16:49 +0100
committerThomas Schwinge <thomas@codesourcery.com>2013-03-21 16:05:29 +0100
commit5aa4a1a1fd742479818a668d42d91ca9ec4a6318 (patch)
tree33ff8dddda5606d8646047fc8fedf63630849832 /math
parent98c48fe5cc4317123a168490a8fb37540e23f104 (diff)
downloadglibc-5aa4a1a1fd742479818a668d42d91ca9ec4a6318.tar
glibc-5aa4a1a1fd742479818a668d42d91ca9ec4a6318.tar.gz
glibc-5aa4a1a1fd742479818a668d42d91ca9ec4a6318.tar.bz2
glibc-5aa4a1a1fd742479818a668d42d91ca9ec4a6318.zip
On 32-bit x86, disable certain tests involving sNaN values.
Follow-up to commit 495ded2c8c1eb8c0ac4b54add2dd397852e19cba.
Diffstat (limited to 'math')
-rw-r--r--math/test-snan.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/math/test-snan.c b/math/test-snan.c
index 83657eef01..f185cbb45c 100644
--- a/math/test-snan.c
+++ b/math/test-snan.c
@@ -29,6 +29,9 @@
#include <setjmp.h>
#include <errno.h>
+#include <math-tests.h>
+
+
int dest_offset;
char *dest_address;
double value = 123.456;
@@ -139,7 +142,8 @@ NAME (void) \
printf (#FLOAT " isnan (sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isnan (sNaN)", isnan (sNaN_var)); \
+ check (#FLOAT " isnan (sNaN)", \
+ SNAN_TESTS (FLOAT) ? isnan (sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -149,7 +153,8 @@ NAME (void) \
printf (#FLOAT " isnan (-sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isnan (-sNaN)", isnan (minus_sNaN_var)); \
+ check (#FLOAT " isnan (-sNaN)", \
+ SNAN_TESTS (FLOAT) ? isnan (minus_sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -179,7 +184,8 @@ NAME (void) \
printf (#FLOAT " isinf (sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isinf (sNaN)", !isinf (sNaN_var)); \
+ check (#FLOAT " isinf (sNaN)", \
+ SNAN_TESTS (FLOAT) ? !isinf (sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -189,7 +195,8 @@ NAME (void) \
printf (#FLOAT " isinf (-sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isinf (-sNaN)", !isinf (minus_sNaN_var)); \
+ check (#FLOAT " isinf (-sNaN)", \
+ SNAN_TESTS (FLOAT) ? !isinf (minus_sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -219,7 +226,8 @@ NAME (void) \
printf (#FLOAT " isfinite (sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isfinite (sNaN)", !isfinite (sNaN_var)); \
+ check (#FLOAT " isfinite (sNaN)", \
+ SNAN_TESTS (FLOAT) ? !isfinite (sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -229,7 +237,8 @@ NAME (void) \
printf (#FLOAT " isfinite (-sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isfinite (-sNaN)", !isfinite (minus_sNaN_var)); \
+ check (#FLOAT " isfinite (-sNaN)", \
+ SNAN_TESTS (FLOAT) ? !isfinite (minus_sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -259,7 +268,8 @@ NAME (void) \
printf (#FLOAT " isnormal (sNaN) isnormal SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isnormal (sNaN)", !isnormal (sNaN_var)); \
+ check (#FLOAT " isnormal (sNaN)", \
+ SNAN_TESTS (FLOAT) ? !isnormal (sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -269,7 +279,8 @@ NAME (void) \
printf (#FLOAT " isnormal (-sNaN) raised SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " isnormal (-sNaN)", !isnormal (minus_sNaN_var)); \
+ check (#FLOAT " isnormal (-sNaN)", \
+ SNAN_TESTS (FLOAT) ? !isnormal (minus_sNaN_var) : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -299,7 +310,8 @@ NAME (void) \
printf (#FLOAT " fpclassify (sNaN) isnormal SIGFPE\n"); \
errors++; \
} else { \
- check (#FLOAT " fpclassify (sNaN)", fpclassify (sNaN_var) == FP_NAN); \
+ check (#FLOAT " fpclassify (sNaN)", \
+ SNAN_TESTS (FLOAT) ? fpclassify (sNaN_var) == FP_NAN : 1); \
} \
\
feclearexcept(FE_ALL_EXCEPT); \
@@ -310,7 +322,7 @@ NAME (void) \
errors++; \
} else { \
check (#FLOAT " fpclassify (-sNaN)", \
- fpclassify (minus_sNaN_var) == FP_NAN); \
+ SNAN_TESTS (FLOAT) ? fpclassify (minus_sNaN_var) == FP_NAN : 1); \
} \
\
fesetenv(&saved_fenv); /* restore saved fenv */ \