diff mbox

[testsuite] gcc.dg/march.c: expect extra message for ARM

Message ID 4DDEB60D.8000807@codesourcery.com
State New
Headers show

Commit Message

Janis Johnson May 26, 2011, 8:20 p.m. UTC
Changes went into ARM support recently to add an informative note after an error about an invalid argument to -march=.  This patch looks for that message on ARM targets and allows the test to once again pass.

OK for trunk?

Comments

Bernd Schmidt May 26, 2011, 8:23 p.m. UTC | #1
On 05/26/2011 08:20 PM, Janis Johnson wrote:
> Changes went into ARM support recently to add an informative note after an error about an invalid argument to -march=.  This patch looks for that message on ARM targets and allows the test to once again pass.
> 
> OK for trunk?

mtune.c does the following:

/* { dg-prune-output "note: valid arguments.*" } */

which is probably better as it's target independent? OK to make that change.


Bernd
Janis Johnson May 26, 2011, 8:30 p.m. UTC | #2
On 05/26/2011 01:23 PM, Bernd Schmidt wrote:
> On 05/26/2011 08:20 PM, Janis Johnson wrote:
>> Changes went into ARM support recently to add an informative note after an error about an invalid argument to -march=.  This patch looks for that message on ARM targets and allows the test to once again pass.
>>
>> OK for trunk?
> 
> mtune.c does the following:
> 
> /* { dg-prune-output "note: valid arguments.*" } */
> 
> which is probably better as it's target independent? OK to make that change.

I would prefer to look for the note in both tests, currently for arm
and perhaps later for additional targets that use it.  Let's see what
others have to say.

Janis
Joseph Myers May 26, 2011, 9:54 p.m. UTC | #3
On Thu, 26 May 2011, Janis Johnson wrote:

> On 05/26/2011 01:23 PM, Bernd Schmidt wrote:
> > On 05/26/2011 08:20 PM, Janis Johnson wrote:
> >> Changes went into ARM support recently to add an informative note after an error about an invalid argument to -march=.  This patch looks for that message on ARM targets and allows the test to once again pass.
> >>
> >> OK for trunk?
> > 
> > mtune.c does the following:
> > 
> > /* { dg-prune-output "note: valid arguments.*" } */
> > 
> > which is probably better as it's target independent? OK to make that change.
> 
> I would prefer to look for the note in both tests, currently for arm
> and perhaps later for additional targets that use it.  Let's see what
> others have to say.

It should end up being every target; if you want to list targets 
explicitly you should use a blacklist of targets that haven't been 
converted to use Enum for -march= yet.  Except that targets may not have 
-march= at all, so that doesn't work without whitelisting the targets with 
no -march= option.  I think pruning for all targets is the right approach.
Janis Johnson May 26, 2011, 10:03 p.m. UTC | #4
On 05/26/2011 02:54 PM, Joseph S. Myers wrote:
> On Thu, 26 May 2011, Janis Johnson wrote:
> 
>> On 05/26/2011 01:23 PM, Bernd Schmidt wrote:
>>> On 05/26/2011 08:20 PM, Janis Johnson wrote:
>>>> Changes went into ARM support recently to add an informative note after an error about an invalid argument to -march=.  This patch looks for that message on ARM targets and allows the test to once again pass.
>>>>
>>>> OK for trunk?
>>>
>>> mtune.c does the following:
>>>
>>> /* { dg-prune-output "note: valid arguments.*" } */
>>>
>>> which is probably better as it's target independent? OK to make that change.
>>
>> I would prefer to look for the note in both tests, currently for arm
>> and perhaps later for additional targets that use it.  Let's see what
>> others have to say.
> 
> It should end up being every target; if you want to list targets 
> explicitly you should use a blacklist of targets that haven't been 
> converted to use Enum for -march= yet.  Except that targets may not have 
> -march= at all, so that doesn't work without whitelisting the targets with 
> no -march= option.  I think pruning for all targets is the right approach.
> 

OK, you guys convinced me, pruning it is.  I'll commit a patch to do that.

Janis
diff mbox

Patch

Index: gcc.dg/march.c
===================================================================
--- gcc.dg/march.c	(revision 163294)
+++ gcc.dg/march.c	(working copy)
@@ -2,5 +2,6 @@ 
 /* { dg-skip-if "" { *-*-* } { "-march=*" } { "" } } */
 /* { dg-options "-march=foo" } */
 /* { dg-error "march" "" { target *-*-* } 0 } */
+/* { dg-message "note: valid arguments" "note" { target arm*-*-* } 0 } */
 /* { dg-bogus "mtune" "" { target *-*-* } 0 } */
 int i;