]> Savannah Git Hosting - gnulib.git/commitdiff
exp* tests: Work around clang 6.0.1 optimization bugs on x86.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2021 11:47:42 +0000 (12:47 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2021 11:47:42 +0000 (12:47 +0100)
* tests/test-exp-ieee.h (test_function): Mark some variable as
'volatile'.
* tests/test-exp2-ieee.h (test_function): Likewise.

ChangeLog
tests/test-exp-ieee.h
tests/test-exp2-ieee.h

index 1bcb7c78a2dabbf3f3244f1031e64f64c06c98f9..f04ed0afed5f62db8523ed0da42785c0a3c2f1f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-09  Bruno Haible  <bruno@clisp.org>
+
+       exp* tests: Work around clang 6.0.1 optimization bugs on x86.
+       * tests/test-exp-ieee.h (test_function): Mark some variable as
+       'volatile'.
+       * tests/test-exp2-ieee.h (test_function): Likewise.
+
 2021-01-09  Bruno Haible  <bruno@clisp.org>
 
        fchmodat: Work around trailing slash bug in fchmodat() on AIX 7.2.
index 7e898a517115377d21f2296636102deb1c7fe8d6..c426feb21efd01f0779fa57880736018f9d047fe 100644 (file)
@@ -21,7 +21,7 @@ test_function (void)
 
   /* Underflow.  */
   {
-    DOUBLE z = EXP (-100000.0);
+    volatile DOUBLE z = EXP (-100000.0);
     ASSERT (z == L_(0.0));
     ASSERT (!signbit (z));
   }
index 9a3a19665a7e0914e76c7530a560fcf23441ea40..8b5745416d19cbac0cc71a94e4df027a2017e525 100644 (file)
@@ -21,7 +21,7 @@ test_function (void)
 
   /* Underflow.  */
   {
-    DOUBLE z = EXP2 (-100000.0);
+    volatile DOUBLE z = EXP2 (-100000.0);
     ASSERT (z == L_(0.0));
     ASSERT (!signbit (z));
   }