From: Bruno Haible Date: Sun, 20 Nov 2011 16:43:49 +0000 (+0100) Subject: fma tests: Avoid shadowing local variables. X-Git-Tag: v0.1~1416 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2fe717a0bab09f8399f7b1ebe91333c4599584b8;p=gnulib.git fma tests: Avoid shadowing local variables. * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result, expected. --- diff --git a/ChangeLog b/ChangeLog index 21a9c6d72e..e4477869c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-11-20 Bruno Haible + + fma tests: Avoid shadowing local variables. + * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result, + expected. + 2011-11-20 Bruno Haible copysignf tests: Fix. diff --git a/tests/test-fma2.h b/tests/test-fma2.h index 1bbb5de7c7..349cf98282 100644 --- a/tests/test-fma2.h +++ b/tests/test-fma2.h @@ -52,14 +52,14 @@ test_function (DOUBLE (*my_fma) (DOUBLE, DOUBLE, DOUBLE)) L_(1.0), - L_(1.0), L_(1.0), - L_(1.0), L_(1.0), - L_(1.0), L_(1.0), - L_(1.0) }; - volatile DOUBLE x; - volatile DOUBLE y; - volatile DOUBLE z; - volatile DOUBLE result; - volatile DOUBLE expected; /* A product x * y that consists of two bits. */ { + volatile DOUBLE x; + volatile DOUBLE y; + volatile DOUBLE z; + volatile DOUBLE result; + volatile DOUBLE expected; int xs; int xe; int ys; @@ -127,6 +127,11 @@ test_function (DOUBLE (*my_fma) (DOUBLE, DOUBLE, DOUBLE)) } /* A product x * y that consists of three bits. */ { + volatile DOUBLE x; + volatile DOUBLE y; + volatile DOUBLE z; + volatile DOUBLE result; + volatile DOUBLE expected; int i; int xs; int xe; @@ -361,6 +366,11 @@ test_function (DOUBLE (*my_fma) (DOUBLE, DOUBLE, DOUBLE)) /* A product x * y that consists of one segment of bits (or, if you prefer, two bits, one with positive weight and one with negative weight). */ { + volatile DOUBLE x; + volatile DOUBLE y; + volatile DOUBLE z; + volatile DOUBLE result; + volatile DOUBLE expected; int i; int xs; int xe;