]> Savannah Git Hosting - gnulib.git/commitdiff
pow tests: Defeat compiler optimizations.
authorBruno Haible <bruno@clisp.org>
Sat, 8 Oct 2011 12:03:06 +0000 (14:03 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 8 Oct 2011 12:03:06 +0000 (14:03 +0200)
* tests/test-pow.c (main): Assign arguments to x and y before use.

ChangeLog
tests/test-pow.c

index 6adcad6e785ca73bc694c9ad6247d28d9382be3e..942ee760ea6ce8c47e284b8285a56a9193a7c3b9 100644 (file)
--- 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.
index 629b90874e1c08979398baf9f58f94fd7334cb1a..539feff2436fdf91727f8d38d6ed8c10af085d1b 100644 (file)
@@ -33,7 +33,9 @@ int
 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;