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: https://gitweb.git.savannah.gnu.org/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 6adcad6e78..942ee760ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/tests/test-pow.c b/tests/test-pow.c index 629b90874e..539feff243 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;