diff options
author | Bruno Haible <bruno@clisp.org> | 2023-04-26 00:16:06 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-27 18:24:11 +0200 |
commit | 18614889b9640779c78c5e6be4c283950314a8f4 (patch) | |
tree | d2ca8ca7f0639f22f64f54a33faa8ced4cd72a59 | |
parent | fe6dc49a2b93eee9281613523cc81ca166b852c4 (diff) | |
download | gnulib-18614889b9640779c78c5e6be4c283950314a8f4.tar.gz |
expm1 tests: Avoid test failure on 32-bit mingw.
* tests/test-expm1.h (test_function): Mark y as 'volatile'.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tests/test-expm1.h | 6 |
2 files changed, 6 insertions, 5 deletions
@@ -1,5 +1,10 @@ 2023-04-25 Bruno Haible <bruno@clisp.org> + expm1 tests: Avoid test failure on 32-bit mingw. + * tests/test-expm1.h (test_function): Mark y as 'volatile'. + +2023-04-25 Bruno Haible <bruno@clisp.org> + poll tests: Avoid test failure on native Windows. * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on native Windows. diff --git a/tests/test-expm1.h b/tests/test-expm1.h index 8d2a9b9398..68f3f6be6f 100644 --- a/tests/test-expm1.h +++ b/tests/test-expm1.h @@ -35,14 +35,10 @@ test_function (void) for (i = -1, x = L_(0.5); i >= MIN_EXP; i--, x *= L_(0.5)) { - DOUBLE y; + volatile DOUBLE y; y = EXPM1 (x); -#ifdef __MINGW32__ /* mingw returns a value that is slightly too small. */ - ASSERT (y >= x * (L_(1.0) - L_(1.0) / TWO_MANT_DIG)); -#else ASSERT (y >= x); -#endif ASSERT (y < L_(1.5) * x); y = EXPM1 (- x); |