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

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).