From owner-svn-src-head@FreeBSD.ORG Tue Sep 9 22:14:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21C26F06; Tue, 9 Sep 2014 22:14:16 +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 E81D4FA9; Tue, 9 Sep 2014 22:14:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89MEFQF024140; Tue, 9 Sep 2014 22:14:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89MEF0Q024139; Tue, 9 Sep 2014 22:14:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409092214.s89MEF0Q024139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 9 Sep 2014 22:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271336 - head/tools/regression/lib/msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 22:14:16 -0000 Author: ngie Date: Tue Sep 9 22:14:15 2014 New Revision: 271336 URL: http://svnweb.freebsd.org/changeset/base/271336 Log: Expand the tests structure in test_small(..) to workaround the "initializer not constant" warning with gcc Approved by: jmmv (mentor) MFC after: 3 days Phabric: D744 Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/lib/msun/test-invctrig.c Modified: head/tools/regression/lib/msun/test-invctrig.c ============================================================================== --- head/tools/regression/lib/msun/test-invctrig.c Tue Sep 9 21:13:47 2014 (r271335) +++ head/tools/regression/lib/msun/test-invctrig.c Tue Sep 9 22:14:15 2014 (r271336) @@ -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. */