From 98ae5bfae5f14c50959ea0e2d13fa5cb85ff59fb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 8 Oct 2011 14:03:06 +0200 Subject: [PATCH] pow tests: Defeat compiler optimizations. * tests/test-pow.c (main): Assign arguments to x and y before use. --- ChangeLog | 5 +++++ tests/test-pow.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6adcad6e7..942ee760e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-10-08 Bruno Haible + pow tests: Defeat compiler optimizations. + * tests/test-pow.c (main): Assign arguments to x and y before use. + +2011-10-08 Bruno Haible + gnulib-tool: Improve last commit. * gnulib-tool (func_modules_transitive_closure): Simplify code. (func_emit_autoconf_snippets): Instead of invoking func_acceptable, diff --git a/tests/test-pow.c b/tests/test-pow.c index 629b90874..539feff24 100644 --- a/tests/test-pow.c +++ b/tests/test-pow.c @@ -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; -- 2.11.0