From owner-svn-src-all@FreeBSD.ORG Thu Oct 23 01:01:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E2AEB3; Thu, 23 Oct 2014 01:01:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F40CCDC4; Thu, 23 Oct 2014 01:01:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9N11w2E089121; Thu, 23 Oct 2014 01:01:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9N11wIu089120; Thu, 23 Oct 2014 01:01:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410230101.s9N11wIu089120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 23 Oct 2014 01:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273502 - stable/10/tools/regression/lib/msun X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 01:01:59 -0000 Author: ngie Date: Thu Oct 23 01:01:58 2014 New Revision: 273502 URL: https://svnweb.freebsd.org/changeset/base/273502 Log: 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 Modified: stable/10/tools/regression/lib/msun/test-invctrig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/lib/msun/test-invctrig.c ============================================================================== --- stable/10/tools/regression/lib/msun/test-invctrig.c Thu Oct 23 00:54:52 2014 (r273501) +++ stable/10/tools/regression/lib/msun/test-invctrig.c Thu Oct 23 01:01:58 2014 (r273502) @@ -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. */