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 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; -- 2.39.5