From 2fe717a0bab09f8399f7b1ebe91333c4599584b8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 20 Nov 2011 17:43:49 +0100 Subject: [PATCH] fma tests: Avoid shadowing local variables. * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result, expected. --- ChangeLog | 6 ++++++ tests/test-fma2.h | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21a9c6d72..e4477869c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 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. * tests/test-copysignf.c: Fix signature check. diff --git a/tests/test-fma2.h b/tests/test-fma2.h index 1bbb5de7c..349cf9828 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; -- 2.11.0