This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, testsuite, ia64] patch for gcc.dg/mtune.c


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]