This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, testsuite] Fix g++.dg/pr67989.C test failure when running with -march or -mcpu
- From: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, Thomas Preud'homme <thomas dot preudhomme at foss dot arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- Date: Thu, 7 Jan 2016 10:26:28 +0000
- Subject: Re: [PATCH, testsuite] Fix g++.dg/pr67989.C test failure when running with -march or -mcpu
- Authentication-results: sourceware.org; auth=none
- References: <11095502 dot M7ODFCTl7m at hardin dot shanghai dot arm dot com> <568B9F4A dot 9040506 at foss dot arm dot com> <2473751 dot Rhs2oJLPHV at hardin dot shanghai dot arm dot com> <568E2CA3 dot 8040406 at foss dot arm dot com>
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
>