From: Bruno Haible Date: Sat, 8 Oct 2011 12:03:06 +0000 (+0200) Subject: pow tests: Defeat compiler optimizations. X-Git-Tag: v0.1~1671 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=98ae5bfae5f14c50959ea0e2d13fa5cb85ff59fb;p=gnulib.git pow tests: Defeat compiler optimizations. * tests/test-pow.c (main): Assign arguments to x and y before use. --- 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;