]> Savannah Git Hosting - gnulib.git/commitdiff
expm1 tests: Avoid test failure on 32-bit mingw.
authorBruno Haible <bruno@clisp.org>
Tue, 25 Apr 2023 22:16:06 +0000 (00:16 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 25 Apr 2023 22:16:06 +0000 (00:16 +0200)
* tests/test-expm1.h (test_function): Mark y as 'volatile'.

ChangeLog
tests/test-expm1.h

index 1a980889b93f0c457582d0475e9d88b0c59d5a37..0884a04d7c5182cfa97ea2c6e6846d19b0e8c2f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index 8d2a9b939879baeaaf8899c5c3642e6ea2bb710a..68f3f6be6fe20e96ee82ba70de04a9596d17a931 100644 (file)
@@ -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);