summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-10-23 01:01:58 +0000
committerngie <ngie@FreeBSD.org>2014-10-23 01:01:58 +0000
commit7eb987ee39f70147045585d0de7db48a44b80d37 (patch)
tree8b79209865dd0a57e6be88aa8a27c4076685b172 /tools/regression
parent813210d1c2ee9d23c0ad251bbb2cff319d37c4b3 (diff)
downloadFreeBSD-src-7eb987ee39f70147045585d0de7db48a44b80d37.zip
FreeBSD-src-7eb987ee39f70147045585d0de7db48a44b80d37.tar.gz
MFC r271336:
Expand the tests structure in test_small(..) to workaround the "initializer not constant" warning with gcc Approved by: jmmv (mentor) Phabric: D744 Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/lib/msun/test-invctrig.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/tools/regression/lib/msun/test-invctrig.c b/tools/regression/lib/msun/test-invctrig.c
index e78c26b..78b1119 100644
--- a/tools/regression/lib/msun/test-invctrig.c
+++ b/tools/regression/lib/msun/test-invctrig.c
@@ -315,25 +315,20 @@ test_small(void)
* asin(z) = Pi/4 + i ln(2)/2
* atan(z) = atan(4)/2 + i ln(17/9)/4
*/
- static const struct {
- complex long double z;
- complex long double acos_z;
- complex long double asin_z;
- complex long double atan_z;
- } tests[] = {
- { CMPLXL(0.75L, 0.25L),
- CMPLXL(pi / 4, -0.34657359027997265470861606072908828L),
- CMPLXL(pi / 4, 0.34657359027997265470861606072908828L),
- CMPLXL(0.66290883183401623252961960521423782L,
- 0.15899719167999917436476103600701878L) },
- };
- int i;
-
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
- testall_tol(cacos, tests[i].z, tests[i].acos_z, 2);
- testall_odd_tol(casin, tests[i].z, tests[i].asin_z, 2);
- testall_odd_tol(catan, tests[i].z, tests[i].atan_z, 2);
- }
+ complex long double z;
+ complex long double acos_z;
+ complex long double asin_z;
+ complex long double atan_z;
+
+ z = CMPLXL(0.75L, 0.25L);
+ acos_z = CMPLXL(pi / 4, -0.34657359027997265470861606072908828L);
+ asin_z = CMPLXL(pi / 4, 0.34657359027997265470861606072908828L);
+ atan_z = CMPLXL(0.66290883183401623252961960521423782L,
+ 0.15899719167999917436476103600701878L);
+
+ testall_tol(cacos, z, acos_z, 2);
+ testall_odd_tol(casin, z, asin_z, 2);
+ testall_odd_tol(catan, z, atan_z, 2);
}
/* Test inputs that might cause overflow in a sloppy implementation. */
OpenPOWER on IntegriCloud