From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75117 invoked by alias); 7 Jan 2016 10:26:35 -0000 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 Received: (qmail 75100 invoked by uid 89); 7 Jan 2016 10:26:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:add_opt, pr67989.C, dgaddoptions, dg-add-options X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Jan 2016 10:26:33 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8FE7449; Thu, 7 Jan 2016 02:25:57 -0800 (PST) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A6BE13F308; Thu, 7 Jan 2016 02:26:29 -0800 (PST) Subject: Re: [PATCH, testsuite] Fix g++.dg/pr67989.C test failure when running with -march or -mcpu To: Kyrill Tkachov , Thomas Preud'homme References: <11095502.M7ODFCTl7m@hardin.shanghai.arm.com> <568B9F4A.9040506@foss.arm.com> <2473751.Rhs2oJLPHV@hardin.shanghai.arm.com> <568E2CA3.8040406@foss.arm.com> Cc: gcc-patches@gcc.gnu.org, Ramana Radhakrishnan From: "Richard Earnshaw (lists)" Message-ID: <568E3D54.40508@arm.com> Date: Thu, 07 Jan 2016 10:26:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <568E2CA3.8040406@foss.arm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00293.txt.bz2 On 07/01/16 09:15, Kyrill Tkachov wrote: > > On 07/01/16 07:34, Thomas Preud'homme wrote: >> On Tuesday, January 05, 2016 10:47:38 AM Kyrill Tkachov wrote: >>> Hi Thomas, >> Hi Kyrill, >> >>>> diff --git a/gcc/testsuite/g++.dg/pr67989.C >>>> b/gcc/testsuite/g++.dg/pr67989.C index >>>> 90261c450b4b9429fb989f7df62f3743017c7363..61be8e172a96df5bb76f7ecd8543dadf >>>> >>>> 825e7dc7 100644 >>>> --- a/gcc/testsuite/g++.dg/pr67989.C >>>> +++ b/gcc/testsuite/g++.dg/pr67989.C >>>> @@ -1,5 +1,6 @@ >>>> >>>> /* { dg-do compile } */ >>>> /* { dg-options "-std=c++11 -O2" } */ >>>> >>>> +/* { dg-skip-if "do not override -mcpu" { arm*-*-* } { "-march=*" >>>> "-mcpu=*" } { "-march=armv4t" } } */ >>>> >>>> /* { dg-additional-options "-marm -march=armv4t" { target >>>> arm*-*-* } } >>>> */ >>> How about we try to do it using the add_options_for_arm_arch_v4t >>> machinery >>> and the arm_arch_v4t_ok check? >> I don't quite understand. dg-add-options doesn't take a selector >> according to >> GCC internals documentation and dg-additional-options doesn't take >> feature. If >> I use dg-add-options with a require-effective-target that will limit >> this test >> to ARM. >> >> Did I misunderstand your point? > > Humph, you're right. I thought that dg-add-options could take a target > selector. > In this case perhaps we should go the route of just removing the > target-specific option > altogether. > > Richard, that's the approach you recommended, right? > Yes. I think if you really need to test a specific set of target flags, then it might be acceptable to have a duplicate of the test in dg.target/arm (but please put a comment in the (arm version of the) test to explain why it has been duplicated. R. > Thanks, > Kyrill > >> Best regards, >> >> Thomas >