public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, testsuite, ia64] patch for gcc.dg/mtune.c
@ 2011-04-01 21:18 Steve Ellcey
  2011-04-02  0:25 ` Joseph S. Myers
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Ellcey @ 2011-04-01 21:18 UTC (permalink / raw)
  To: gcc-patches

The gcc.dg/mtune.c test is failing on ia64-*-* because in addition to
the expected error message that is output it also prints out a note
about the valid values for mtune.

$ gcc -mtune=foo mtune.c
gcc: error: unrecognized argument in option '-mtune=foo'
gcc: note: valid arguments to '-mtune=' are: itanium2 mckinley

Looking into why this doesn't happen on other systems, it looks like
the difference is that IA64 uses -mtune to set an enum variable and
most (all?) the other platforms use it to set a string variable.

Since the message seems reasonable I propose to just change the test
to expect it.  The patch was tested on IA64 HP-UX and Linux.  If I
don't hear any objections I will just check it in as an obvious fix.

Steve Ellcey
sje@cup.hp.com



2011-04-01  Steve Ellcey  <sje@cup.hp.com>

	* gcc.dg/mtune.c: Add expected note for target ia64-*-*.


Index: gcc.dg/mtune.c
===================================================================
--- gcc.dg/mtune.c	(revision 171815)
+++ gcc.dg/mtune.c	(working copy)
@@ -4,4 +4,5 @@
 /* { dg-error "mtune" "" { target *-*-* } 0 } */
 /* { dg-bogus "march" "" { target *-*-* } 0 } */
 /* { dg-bogus "mcpu" "" { target *-*-* } 0 } */
+/* { dg-message "note: valid arguments" "" { target ia64-*-* } 0 } */
 int i;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch, testsuite, ia64] patch for gcc.dg/mtune.c
  2011-04-01 21:18 [patch, testsuite, ia64] patch for gcc.dg/mtune.c Steve Ellcey
@ 2011-04-02  0:25 ` Joseph S. Myers
  2011-04-04 20:34   ` Steve Ellcey
  2011-04-05 22:19   ` Eric Botcazou
  0 siblings, 2 replies; 6+ messages in thread
From: Joseph S. Myers @ 2011-04-02  0:25 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: gcc-patches

On Fri, 1 Apr 2011, Steve Ellcey wrote:

> Looking into why this doesn't happen on other systems, it looks like
> the difference is that IA64 uses -mtune to set an enum variable and
> most (all?) the other platforms use it to set a string variable.

As an increasing number of targets will start using the Enum facility, it 
would be good to be able to just to accept such a note on all targets 
without requiring it.  But if that isn't possible, then this patch seems 
appropriate (and similar changes to the test will be needed for other 
targets using Enum here).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch, testsuite, ia64] patch for gcc.dg/mtune.c
  2011-04-02  0:25 ` Joseph S. Myers
@ 2011-04-04 20:34   ` Steve Ellcey
  2011-04-05 22:19   ` Eric Botcazou
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Ellcey @ 2011-04-04 20:34 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Sat, 2011-04-02 at 00:25 +0000, Joseph S. Myers wrote:
> On Fri, 1 Apr 2011, Steve Ellcey wrote:
> 
> > Looking into why this doesn't happen on other systems, it looks like
> > the difference is that IA64 uses -mtune to set an enum variable and
> > most (all?) the other platforms use it to set a string variable.
> 
> As an increasing number of targets will start using the Enum facility, it 
> would be good to be able to just to accept such a note on all targets 
> without requiring it.  But if that isn't possible, then this patch seems 
> appropriate (and similar changes to the test will be needed for other 
> targets using Enum here).

I think we could use dg-prune to skip this message if it occurs.  I
don't think that would cause any errors on a system where the message
does not occur.  Let me try that and see if it works.

Steve Ellcey
sje@cup.hp.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch, testsuite, ia64] patch for gcc.dg/mtune.c
  2011-04-02  0:25 ` Joseph S. Myers
  2011-04-04 20:34   ` Steve Ellcey
@ 2011-04-05 22:19   ` Eric Botcazou
  2011-04-05 22:46     ` Steve Ellcey
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Botcazou @ 2011-04-05 22:19 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, Steve Ellcey

> As an increasing number of targets will start using the Enum facility, it
> would be good to be able to just to accept such a note on all targets
> without requiring it.  But if that isn't possible, then this patch seems
> appropriate (and similar changes to the test will be needed for other
> targets using Enum here).

SPARC is a candidate.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch, testsuite, ia64] patch for gcc.dg/mtune.c
  2011-04-05 22:19   ` Eric Botcazou
@ 2011-04-05 22:46     ` Steve Ellcey
  2011-04-05 22:57       ` Eric Botcazou
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Ellcey @ 2011-04-05 22:46 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Joseph S. Myers, gcc-patches

On Wed, 2011-04-06 at 00:17 +0200, Eric Botcazou wrote:
> > As an increasing number of targets will start using the Enum facility, it
> > would be good to be able to just to accept such a note on all targets
> > without requiring it.  But if that isn't possible, then this patch seems
> > appropriate (and similar changes to the test will be needed for other
> > targets using Enum here).
> 
> SPARC is a candidate.

I believe this patch will work for any platform and I will check it in
once I can test it.  I have been having bootstrap problems due to other
issues so I haven't been able to test it yet on all my platforms (some
of which will issue the note and others of which will not).

2011-04-05  Steve Ellcey  <sje@cup.hp.com>

        * gcc.dg/mtune.c: Prune note from output.



Index: gcc.dg/mtune.c
===================================================================
--- gcc.dg/mtune.c      (revision 172006)
+++ gcc.dg/mtune.c      (working copy)
@@ -4,4 +4,5 @@
 /* { dg-error "mtune" "" { target *-*-* } 0 } */
 /* { dg-bogus "march" "" { target *-*-* } 0 } */
 /* { dg-bogus "mcpu" "" { target *-*-* } 0 } */
+/* { dg-prune-output "note: valid arguments.*" } */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch, testsuite, ia64] patch for gcc.dg/mtune.c
  2011-04-05 22:46     ` Steve Ellcey
@ 2011-04-05 22:57       ` Eric Botcazou
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Botcazou @ 2011-04-05 22:57 UTC (permalink / raw)
  To: sje; +Cc: Joseph S. Myers, gcc-patches

> I believe this patch will work for any platform and I will check it in
> once I can test it.  I have been having bootstrap problems due to other
> issues so I haven't been able to test it yet on all my platforms (some
> of which will issue the note and others of which will not).
>
> 2011-04-05  Steve Ellcey  <sje@cup.hp.com>
>
>         * gcc.dg/mtune.c: Prune note from output.

It works fine on the SPARC, thanks!

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-05 22:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-01 21:18 [patch, testsuite, ia64] patch for gcc.dg/mtune.c Steve Ellcey
2011-04-02  0:25 ` Joseph S. Myers
2011-04-04 20:34   ` Steve Ellcey
2011-04-05 22:19   ` Eric Botcazou
2011-04-05 22:46     ` Steve Ellcey
2011-04-05 22:57       ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).