changeset 15855:222621347e0b

pow tests: Defeat compiler optimizations. * tests/test-pow.c (main): Assign arguments to x and y before use.
author Bruno Haible <bruno@clisp.org>
date Sat, 08 Oct 2011 14:03:06 +0200
parents d3633bf8b61d
children 3251de063435
files ChangeLog tests/test-pow.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-08  Bruno Haible  <bruno@clisp.org>
+
+	pow tests: Defeat compiler optimizations.
+	* tests/test-pow.c (main): Assign arguments to x and y before use.
+
 2011-10-08  Bruno Haible  <bruno@clisp.org>
 
 	gnulib-tool: Improve last commit.
--- a/tests/test-pow.c
+++ b/tests/test-pow.c
@@ -33,7 +33,9 @@
 main ()
 {
   /* A particular value.  */
-  z = pow (243.0, 1.2);
+  x = 243.0;
+  y = 1.2;
+  z = pow (x, y);
   ASSERT (z >= 728.9999999 && z <= 729.0000001);
 
   return 0;