mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 22:30:07 +00:00
Fix math/test-fenvinline for no-exceptions configurations.
This patch fixes math/test-fenvinline.c to stop it failing in no-exceptions configurations (where some exception macros are defined but may not be supported at runtime). The relevant parts of the test are disabled in that case; some parts can still run (and the rounding mode tests are written in a way such that they work even if the rounding modes aren't supported). Tested for mips64 soft-float, and for x86_64 to make sure the tests still run when the exceptions are supported. * math/test-fenvinline.c (do_test): Disable tests of raised exceptions if !EXCEPTION_TESTS (FLOAT).
This commit is contained in:
parent
8dad72997a
commit
daaff5cc79
@ -1,3 +1,8 @@
|
||||
2017-01-03 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* math/test-fenvinline.c (do_test): Disable tests of raised
|
||||
exceptions if !EXCEPTION_TESTS (FLOAT).
|
||||
|
||||
2017-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
|
||||
[BZ #19390]
|
||||
|
@ -326,8 +326,9 @@ do_test (void)
|
||||
|
||||
/* raise all exceptions and test if all are raised */
|
||||
feraiseexcept (FE_ALL_EXCEPT);
|
||||
test_exceptions ("feraiseexcept (FE_ALL_EXCEPT) raises all exceptions",
|
||||
ALL_EXC);
|
||||
if (EXCEPTION_TESTS (float))
|
||||
test_exceptions ("feraiseexcept (FE_ALL_EXCEPT) raises all exceptions",
|
||||
ALL_EXC);
|
||||
|
||||
/* Same test, but using double as argument */
|
||||
feclearexcept ((double)FE_ALL_EXCEPT);
|
||||
@ -335,10 +336,12 @@ do_test (void)
|
||||
NO_EXC);
|
||||
|
||||
feraiseexcept ((double)FE_ALL_EXCEPT);
|
||||
test_exceptions ("feraiseexcept ((double)FE_ALL_EXCEPT) raises all exceptions",
|
||||
ALL_EXC);
|
||||
if (EXCEPTION_TESTS (float))
|
||||
test_exceptions ("feraiseexcept ((double)FE_ALL_EXCEPT) raises all exceptions",
|
||||
ALL_EXC);
|
||||
|
||||
test_exceptionflag ();
|
||||
if (EXCEPTION_TESTS (float))
|
||||
test_exceptionflag ();
|
||||
|
||||
test_fesetround ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user