summaryrefslogtreecommitdiff
path: root/math/test-misc.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-12 12:41:25 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-12 12:41:25 +0000
commit94f2c076692a5a4beaa9a85eb10dbe4d891acb1e (patch)
tree48e2f584064a6ed75bfa90cdb66d2d6ce71924c7 /math/test-misc.c
parente0e50a0a31ff04c325513ade44197f8ae8dd324b (diff)
Make more libm tests condition exceptions tests with math-tests.h.
Diffstat (limited to 'math/test-misc.c')
-rw-r--r--math/test-misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/math/test-misc.c b/math/test-misc.c
index c13bafa117..94c7c1531f 100644
--- a/math/test-misc.c
+++ b/math/test-misc.c
@@ -22,6 +22,7 @@
#include <math.h>
#include <stdio.h>
#include <string.h>
+#include <math-tests.h>
int
@@ -1188,7 +1189,7 @@ main (void)
f2 += f1;
#if defined(FE_OVERFLOW) && defined(FE_INEXACT)
int fe = fetestexcept (FE_ALL_EXCEPT);
- if (fe != (FE_OVERFLOW | FE_INEXACT))
+ if (EXCEPTION_TESTS (float) && fe != (FE_OVERFLOW | FE_INEXACT))
{
printf ("float overflow test failed: %x\n", fe);
result = 1;
@@ -1203,7 +1204,7 @@ main (void)
d2 += d1;
#if defined(FE_OVERFLOW) && defined(FE_INEXACT)
fe = fetestexcept (FE_ALL_EXCEPT);
- if (fe != (FE_OVERFLOW | FE_INEXACT))
+ if (EXCEPTION_TESTS (double) && fe != (FE_OVERFLOW | FE_INEXACT))
{
printf ("double overflow test failed: %x\n", fe);
result = 1;
@@ -1219,7 +1220,7 @@ main (void)
ld2 += ld1;
# if defined(FE_OVERFLOW) && defined(FE_INEXACT)
fe = fetestexcept (FE_ALL_EXCEPT);
- if (fe != (FE_OVERFLOW | FE_INEXACT))
+ if (EXCEPTION_TESTS (long double) && fe != (FE_OVERFLOW | FE_INEXACT))
{
printf ("long double overflow test failed: %x\n", fe);
result = 1;