changeset 16110:146b5e66e142

fma tests: Avoid shadowing local variables. * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result, expected.
author Bruno Haible <bruno@clisp.org>
date Sun, 20 Nov 2011 17:43:49 +0100
parents 349096e3d58d
children 9872b9859dd0
files ChangeLog tests/test-fma2.h
diffstat 2 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-20  Bruno Haible  <bruno@clisp.org>
+
+	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  <bruno@clisp.org>
 
 	copysignf tests: Fix.
--- a/tests/test-fma2.h
+++ b/tests/test-fma2.h
@@ -52,14 +52,14 @@
       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 @@
   }
   /* 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 @@
   /* 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;