From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16103 invoked by alias); 10 Jun 2011 10:00:33 -0000 Received: (qmail 16078 invoked by uid 22791); 10 Jun 2011 10:00:30 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 10 Jun 2011 10:00:16 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 10 Jun 2011 11:00:12 +0100 Received: from [10.1.67.34] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 10 Jun 2011 11:00:44 +0100 Message-ID: <4DF1EB29.40502@arm.com> Date: Fri, 10 Jun 2011 10:12:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Janis Johnson CC: Mike Stump , "Joseph S. Myers" , "gcc-patches@gcc.gnu.org" Subject: Re: [testsuite] skip ARM tests with conflicting options References: <4DEE8FE7.50001@codesourcery.com> <4DEEB332.2070706@codesourcery.com> <4DEEDAF0.6090100@codesourcery.com> <4DEF516C.7060703@arm.com> <4DF15F7A.9050202@codesourcery.com> In-Reply-To: <4DF15F7A.9050202@codesourcery.com> X-MC-Unique: 111061011001200501 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00816.txt.bz2 On 10/06/11 01:04, Janis Johnson wrote: > On 06/08/2011 03:39 AM, Richard Earnshaw wrote: >> On 08/06/11 03:14, Janis Johnson wrote: >>> On 06/07/2011 06:25 PM, Mike Stump wrote: >>>> On Jun 7, 2011, at 4:24 PM, Janis Johnson wrote: >>>>> On 06/07/2011 02:07 PM, Joseph S. Myers wrote: >>>>>> On Tue, 7 Jun 2011, Janis Johnson wrote: >>>>>> >>>>>>> Several tests in gcc.target/arm use dg-options with -mcpu=3Dxxxx, w= hich >>>>>>> causes compiler warnings or errors when the multilib flags include >>>>>>> -march=3Dyyyy. This patch causes those tests to be skipped. It al= so >>>>>>> prevents gcc.target/arm/20090811-1.c from running with multilibs th= at >>>>>>> would override -mcpu or -mfloat-abi options specified for the test. >>>>>> >>>>>> I think you should allow compatible -march options - for example, if= =20 >>>>>> dg-options has -mcpu=3Dcortex-a8, allow -march=3Darmv7-a but disallo= w all=20 >>>>>> other -march options. >>>>>> >>>>> Is this one OK? >>>> >>>> Not sure if the arm people want to review this or would rather I revie= w it... >>>> >>>> Let's give the arm folks a couple days to comment, if no objections, O= k. >>>> >>>> A point of warning, eventually, you'll discover that when a compiler d= efaults to the argument you want to skip, that you'll needs slightly more p= ower to skip them. darwin ran into this with things like -m64, and eventua= lly had to do something like lp64. configure options like --with-cpu=3Darm= 9 are the sort that can change the default. >>> >>> Yes, I hope to hear from ARM people. >>> >>> On ARM, the default from --with-cpu=3D is overridden by -march at >>> compile so it's not a problem for this particular set of tests. >>> As I said originally, this set is the tip of the iceberg and they >>> get more difficult. >>> >>> Janis >>> >>> >> >> >> I'm worried by this whole approach of command-line checking. It works, >> just about, for testsuite variations set with target_list, but it won't >> work with options used to configure the compiler (eg --with-mode=3Dthumb, >> or --with-cpu=3D...). Perhaps a better approach would be a new dg- test >> that built a trivial file with all the options and disabled the test if >> that test failed for any reason. Something like: >> >> dg-target-compatible (target, , additional-opts) >> >> The test is only performed if target matches the current target. >> >> I'm not sure if this is something that can be easily cached (well, it >> might be possible if you could index off additional-opts and the default >> opts), so it might be that this test has to be re-run every time there >> is a test that needs it. >> >> R. >=20 > As I said earlier, the testsuite already provides effective-target support > that checks for complicated things and it's easy enough to add more. >=20 > Given that there are lots of spurious failures right now due to tests > being compiled with conflicting options, or during dg-final checks when t= he > expected code isn't being generated because multilib options override the > ones given in the test, is this patch to skip tests using -mcpu if the > multilibs use -march OK? I have made the change Joseph suggested to allow > -march values that do not conflict. >=20 > Expect lots more of these patches, with perhaps different solutions for > different tests. >=20 Don't get me wrong, I wasn't objecting to the patch as it is (it's a useful step forward). I'm just raising a concern that I don't think it's a total solution. Janice, I haven't done it, but a compiler built with --with-mode=3Dthumb would be a useful test to run. R.