Patchwork [testsuite] gcc.dg: make message check lines unique in test summary

login
register
mail settings
Submitter Janis Johnson
Date June 12, 2012, 2:37 a.m.
Message ID <4FD6AB83.40709@mentor.com>
Download mbox | patch
Permalink /patch/164314/
State New
Headers show

Comments

Janis Johnson - June 12, 2012, 2:37 a.m.
This test modifies dg-error, dg-warning, dg-message, and dg-bogus test
directives by adding comments that will be added to lines in the test
summary to eliminate non-unique lines for checks of messages for the
same line of source code in a test.

Tested on i686-pc-linux-gnu and arm-none-eabi.  OK for mainline?

Janis
2012-06-11  Janis Johnson  <janisjo@codesourcery.com>

	* gcc.dg/20031223-1.c: Add comments to check for multiple
	messages reported for one line of source code.
	* gcc.dg/Wconversion-integer.c: Likewise.
	* gcc.dg/Wfatal-2.c: Likewise.
	* gcc.dg/Wfatal.c: Likewise.
	* gcc.dg/Wobjsize-1.c: Likewise.
	* gcc.dg/c99-vla-jump-1.c: Likewise.
	* gcc.dg/c99-vla-jump-2.c: Likewise.
	* gcc.dg/c99-vla-jump-3.c: Likewise.
	* gcc.dg/c99-vla-jump-4.c: Likewise.
	* gcc.dg/c99-vla-jump-5.c: Likewise.
	* gcc.dg/decl-9.c: Likewise.
	* gcc.dg/declspec-10.c: Likewise.
	* gcc.dg/declspec-18.c: Likewise.
	* gcc.dg/mtune.c: Likewise.
	* gcc.dg/parser-pr28152-2.c: Likewise.
	* gcc.dg/parser-pr28152.c: Likewise.
	* gcc.dg/pr14475.c: Likewise.
	* gcc.dg/pr27953.c: Likewise.
	* gcc.dg/pr28322-3.c: Likewise.
	* gcc.dg/pr30457.c: Likewise.
	* gcc.dg/pr30551-2.c: Likewise.
	* gcc.dg/pr30551-3.c: Likewise.
	* gcc.dg/pr30551-4.c: Likewise.
	* gcc.dg/pr30551-5.c: Likewise.
	* gcc.dg/pr30551-6.c: Likewise.
	* gcc.dg/pr30551.c: Likewise.
	* gcc.dg/pr45461.c: Likewise.
	* gcc.dg/pr48552-1.c: Likewise.
	* gcc.dg/pr48552-2.c: Likewise.
	* gcc.dg/redecl-1.c: Likewise.
	* gcc.dg/transparent-union-3.c: Likewise.
	* gcc.dg/utf-dflt.c: Likewise.
	* gcc.dg/utf-dflt2.c: Likewise.
	* gcc.dg/vla-8.c: Likewise.
	* gcc.dg/vla-init-1.c: Likewise.
	* gcc.dg/wtr-int-type-1.c: Likewise.
Richard Guenther - June 12, 2012, 8:57 a.m.
On Tue, Jun 12, 2012 at 4:37 AM, Janis Johnson <janis_johnson@mentor.com> wrote:
> This test modifies dg-error, dg-warning, dg-message, and dg-bogus test
> directives by adding comments that will be added to lines in the test
> summary to eliminate non-unique lines for checks of messages for the
> same line of source code in a test.
>
> Tested on i686-pc-linux-gnu and arm-none-eabi.  OK for mainline?

Ok.

Thanks,
RIchard.

> Janis

Patch

Index: gcc.dg/20031223-1.c
===================================================================
--- gcc.dg/20031223-1.c	(revision 188393)
+++ gcc.dg/20031223-1.c	(working copy)
@@ -7,7 +7,7 @@ 
 
 void f ()
 {
- l: int; /* { dg-error "a label can only be part of a statement and a declaration is not a statement" } */
- /* { dg-warning "useless type name in empty declaration" "" { target *-*-* } 10 } */
- /* { dg-error "label at end of compound statement" "" { target *-*-* } 10 } */
+ l: int; /* { dg-error "a label can only be part of a statement and a declaration is not a statement" "not stmt" } */
+ /* { dg-warning "useless type name in empty declaration" "type name" { target *-*-* } 10 } */
+ /* { dg-error "label at end of compound statement" "label" { target *-*-* } 10 } */
 }
Index: gcc.dg/Wconversion-integer.c
===================================================================
--- gcc.dg/Wconversion-integer.c	(revision 188393)
+++ gcc.dg/Wconversion-integer.c	(working copy)
@@ -40,10 +40,10 @@ 
   fuc ('A');
   uc = 'A';
 
-  uc = x ? 1U : -1; /* { dg-warning " conversion" } */
-  /* { dg-warning "negative integer implicitly converted to unsigned type" "" { target *-*-* } 43 } */
-  uc = x ? SCHAR_MIN : 1U; /* { dg-warning " conversion" } */
-  /* { dg-warning "negative integer implicitly converted to unsigned type" "" { target *-*-* } 45 } */
+  uc = x ? 1U : -1; /* { dg-warning " conversion" "conversion" } */
+  /* { dg-warning "negative integer implicitly converted to unsigned type" "implicit" { target *-*-* } 43 } */
+  uc = x ? SCHAR_MIN : 1U; /* { dg-warning " conversion" "conversion" } */
+  /* { dg-warning "negative integer implicitly converted to unsigned type" "implicit" { target *-*-* } 45 } */
   uc = x ? 1 : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
   uc = x ? SCHAR_MIN : 1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
   ui = x ? 1U : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
Index: gcc.dg/Wfatal-2.c
===================================================================
--- gcc.dg/Wfatal-2.c	(revision 188393)
+++ gcc.dg/Wfatal-2.c	(working copy)
@@ -5,5 +5,5 @@ 
 int i = INT_MAX + 1; /* { dg-error "integer overflow in expression" } */
 int k = 1 / 0; 
 int j = INT_MIN - 1;
-/* { dg-message "being treated as errors" "" { target *-*-* } 0 } */
-/* { dg-message "terminated due to -Wfatal-errors" "" { target *-*-* } 0 } */
+/* { dg-message "being treated as errors" "treated as errors" { target *-*-* } 0 } */
+/* { dg-message "terminated due to -Wfatal-errors" "terminated" { target *-*-* } 0 } */
Index: gcc.dg/Wfatal.c
===================================================================
--- gcc.dg/Wfatal.c	(revision 188393)
+++ gcc.dg/Wfatal.c	(working copy)
@@ -5,8 +5,8 @@ 
 int i = INT_MAX + 1; /* { dg-warning "integer overflow in expression" } */
 int k = 1 / 0; /* { dg-error "division by zero" } */
 int j = INT_MIN - 1;
-/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
-/* { dg-message "terminated due to -Wfatal-errors" "" { target *-*-* } 0 } */
+/* { dg-message "some warnings being treated as errors" "treated as errors" {target "*-*-*"} 0 } */
+/* { dg-message "terminated due to -Wfatal-errors" "terminated" { target *-*-* } 0 } */
 
 
 
Index: gcc.dg/Wobjsize-1.c
===================================================================
--- gcc.dg/Wobjsize-1.c	(revision 188393)
+++ gcc.dg/Wobjsize-1.c	(working copy)
@@ -11,5 +11,5 @@ 
 }
 
 /* { dg-warning "will always overflow destination buffer" "" { target *-*-* } 6 } */
-/* { dg-message "file included" "" { target *-*-* } 0 } */
-/* { dg-message "inlined from" "" { target *-*-* } 0 } */
+/* { dg-message "file included" "included" { target *-*-* } 0 } */
+/* { dg-message "inlined from" "inlined" { target *-*-* } 0 } */
Index: gcc.dg/c99-vla-jump-1.c
===================================================================
--- gcc.dg/c99-vla-jump-1.c	(revision 188393)
+++ gcc.dg/c99-vla-jump-1.c	(working copy)
@@ -305,5 +305,5 @@ 
 void fa288 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0;a: goto a;  }
 
 /* Match extra informative notes.  */
-/* { dg-message "note: label '\[^\n'\]*' defined here" "note: expected" { target *-*-* } 0 } */
-/* { dg-message "note: '\[^\n'\]*' declared here" "note: expected" { target *-*-* } 0 } */
+/* { dg-message "note: label '\[^\n'\]*' defined here" "note: defined" { target *-*-* } 0 } */
+/* { dg-message "note: '\[^\n'\]*' declared here" "note: declared" { target *-*-* } 0 } */
Index: gcc.dg/c99-vla-jump-2.c
===================================================================
--- gcc.dg/c99-vla-jump-2.c	(revision 188393)
+++ gcc.dg/c99-vla-jump-2.c	(working copy)
@@ -305,5 +305,5 @@ 
 void fb288 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;a: goto a; P03B:goto P03B; }
 
 /* Match extra informative notes.  */
-/* { dg-message "note: label '\[^\n'\]*' defined here" "note: expected" { target *-*-* } 0 } */
-/* { dg-message "note: '\[^\n'\]*' declared here" "note: expected" { target *-*-* } 0 } */
+/* { dg-message "note: label '\[^\n'\]*' defined here" "note: defined" { target *-*-* } 0 } */
+/* { dg-message "note: '\[^\n'\]*' declared here" "note: declared" { target *-*-* } 0 } */
Index: gcc.dg/c99-vla-jump-3.c
===================================================================
--- gcc.dg/c99-vla-jump-3.c	(revision 188393)
+++ gcc.dg/c99-vla-jump-3.c	(working copy)
@@ -305,5 +305,5 @@ 
 void fc288 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0;a: goto a;  }
 
 /* Match extra informative notes.  */
-/* { dg-message "note: label '\[^\n'\]*' defined here" "note: expected" { target *-*-* } 0 } */
-/* { dg-message "note: '\[^\n'\]*' declared here" "note: expected" { target *-*-* } 0 } */
+/* { dg-message "note: label '\[^\n'\]*' defined here" "note: defined" { target *-*-* } 0 } */
+/* { dg-message "note: '\[^\n'\]*' declared here" "note: declared" { target *-*-* } 0 } */
Index: gcc.dg/c99-vla-jump-4.c
===================================================================
--- gcc.dg/c99-vla-jump-4.c	(revision 188393)
+++ gcc.dg/c99-vla-jump-4.c	(working copy)
@@ -305,5 +305,5 @@ 
 void fd288 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;a: goto a; P03B:goto P03B; }
 
 /* Match extra informative notes.  */
-/* { dg-message "note: label '\[^\n'\]*' defined here" "note: expected" { target *-*-* } 0 } */
-/* { dg-message "note: '\[^\n'\]*' declared here" "note: expected" { target *-*-* } 0 } */
+/* { dg-message "note: label '\[^\n'\]*' defined here" "note: defined" { target *-*-* } 0 } */
+/* { dg-message "note: '\[^\n'\]*' declared here" "note: declared" { target *-*-* } 0 } */
Index: gcc.dg/c99-vla-jump-5.c
===================================================================
--- gcc.dg/c99-vla-jump-5.c	(revision 188393)
+++ gcc.dg/c99-vla-jump-5.c	(working copy)
@@ -30,5 +30,5 @@ 
 }
 
 /* Match extra informative notes.  */
-/* { dg-message "note: switch starts here" "note: expected" { target *-*-* } 0 } */
-/* { dg-message "note: '\[^\n'\]*' declared here" "note: expected" { target *-*-* } 0 } */
+/* { dg-message "note: switch starts here" "note: starts" { target *-*-* } 0 } */
+/* { dg-message "note: '\[^\n'\]*' declared here" "note: declared" { target *-*-* } 0 } */
Index: gcc.dg/decl-9.c
===================================================================
--- gcc.dg/decl-9.c	(revision 188393)
+++ gcc.dg/decl-9.c	(working copy)
@@ -21,7 +21,7 @@ 
 {
 b: a: ; /* { dg-bogus "a label can only be part of a statement" } */
 c: d e; /* { dg-error "a label can only be part of a statement" } */
-/* { dg-error "unknown type name 'd'" "" { target *-*-* } 23 } */
+/* { dg-error "unknown type name 'd'" "unknown type name" { target *-*-* } 23 } */
    ;
 }
 
Index: gcc.dg/declspec-10.c
===================================================================
--- gcc.dg/declspec-10.c	(revision 188393)
+++ gcc.dg/declspec-10.c	(working copy)
@@ -44,4 +44,4 @@ 
 
 inline int main (void) { return 0; } /* { dg-warning "cannot inline function 'main'" } */
 
-/* { dg-message "error: register name not specified for 'y'" "" { target *-*-* } 19 } */
+/* { dg-message "error: register name not specified for 'y'" "not specified" { target *-*-* } 19 } */
Index: gcc.dg/declspec-18.c
===================================================================
--- gcc.dg/declspec-18.c	(revision 188393)
+++ gcc.dg/declspec-18.c	(working copy)
@@ -5,7 +5,7 @@ 
 
 int z;                  /* { dg-message "previous declaration of 'z'" } */
 typedef t2 *z;          /* { dg-error "unknown type name 't2'" } */
-/* { dg-error "'z' redeclared " "" { target *-*-* } 7 } */
+/* { dg-error "'z' redeclared " "redeclared" { target *-*-* } 7 } */
 
 extern t3 p1(void);     /* { dg-error "unknown type name 't3'" } */
 int p2(const t4 x);     /* { dg-error "unknown type name 't4'" } */
@@ -23,36 +23,36 @@ 
 };
 
 typeof (z) c1;
-typeof (x1) c2;         /* { dg-error "undeclared" } */
+typeof (x1) c2;         /* { dg-error "undeclared" "undeclared" } */
 typeof (const t11) c3;  /* { dg-error "unknown type name 't11'" } */
-typeof (t12 *) c3;      /* { dg-error "unknown type name 't12'" "" { xfail *-*-* } } */
-/* { dg-bogus "unknown type name 'x1'" "" { target *-*-* } 26 } */
-/* { dg-bogus "undeclared" "" { xfail *-*-* } 28 } */
-/* { dg-bogus "expected expression before" "" { xfail *-*-* } 28 } */
+typeof (t12 *) c3;      /* { dg-error "unknown type name 't12'" "t12" { xfail *-*-* } } */
+/* { dg-bogus "unknown type name 'x1'" unknown"" { target *-*-* } 26 } */
+/* { dg-bogus "undeclared" "undeclared" { xfail *-*-* } 28 } */
+/* { dg-bogus "expected expression before" "expected" { xfail *-*-* } 28 } */
 
 int recover1;
 
 int s0 = sizeof (z);
-int s1 = sizeof (x2);          /* { dg-error "undeclared" } */
+int s1 = sizeof (x2);          /* { dg-error "undeclared" "undeclared" } */
 int s2 = sizeof (const t13);   /* { dg-error "unknown type name 't13'" } */
-int s3 = sizeof (t14 *);       /* { dg-error "unknown type name 't14'" "" { xfail *-*-* } } */
+int s3 = sizeof (t14 *);       /* { dg-error "unknown type name 't14'" "t14" { xfail *-*-* } } */
 
 int recover2;
 
-/* { dg-bogus "unknown type name 'x2'" "" { target *-*-* } 36 } */
-/* { dg-bogus "undeclared" "" { xfail *-*-* } 38 } */
-/* { dg-bogus "expected expression before" "" { xfail *-*-* } 38 } */
+/* { dg-bogus "unknown type name 'x2'" "unknown" { target *-*-* } 36 } */
+/* { dg-bogus "undeclared" "undeclared" { xfail *-*-* } 38 } */
+/* { dg-bogus "expected expression before" "expected" { xfail *-*-* } 38 } */
 
 int a0 = __alignof__ (z);
 int a1 = __alignof__ (x3);          /* { dg-error "undeclared" } */
 int a2 = __alignof__ (const t15);   /* { dg-error "unknown type name 't15'" } */
-int a3 = __alignof__ (t16 *);       /* { dg-error "unknown type name 't16'" "" { xfail *-*-* } } */
+int a3 = __alignof__ (t16 *);       /* { dg-error "unknown type name 't16'" "t16" { xfail *-*-* } } */
 
 int recover3;
 
 /* { dg-bogus "unknown type name 'x3'" "" { target *-*-* } 47 } */
-/* { dg-bogus "undeclared" "" { xfail *-*-* } 49 } */
-/* { dg-bogus "expected expression before" "" { xfail *-*-* } 49 } */
+/* { dg-bogus "undeclared" "undeclared" { xfail *-*-* } 49 } */
+/* { dg-bogus "expected expression before" "expected" { xfail *-*-* } 49 } */
 
 
 /* Cannot detect (undefd_type *) or (undefd_type (*) because it would
@@ -60,14 +60,14 @@ 
 
 const char *f1()
 {
-  return (const t17) "abc";       /* { dg-error "unknown type name 't17'" } */
-/* { dg-bogus "expected" "" { target *-*-* } 63 } */
+  return (const t17) "abc";       /* { dg-error "unknown type name 't17'" "t17" } */
+/* { dg-bogus "expected" "expected" { target *-*-* } 63 } */
 }
 
 const char *f2()
 {
-  return (const t18 *) "abc";     /* { dg-error "unknown type name 't18'" } */
-/* { dg-bogus "expected" "" { target *-*-* } 69 } */
+  return (const t18 *) "abc";     /* { dg-error "unknown type name 't18'" "t18" } */
+/* { dg-bogus "expected" "expected" { target *-*-* } 69 } */
 }
 
 
@@ -76,15 +76,15 @@ 
 
 void *f3(int x)
 {
-  return (void *) ((void *(*)(t19)) f3);       /* { dg-error "unknown type name 't19'" } */
-/* { dg-bogus "expected" "" { xfail *-*-* } 79 } */
+  return (void *) ((void *(*)(t19)) f3);       /* { dg-error "unknown type name 't19'" "t19" } */
+/* { dg-bogus "expected" "expected" { xfail *-*-* } 79 } */
 }
 
 const void *f4()
 {
   return &((const t20){1});       /* { dg-error "unknown type name 't20'" } */
-/* { dg-bogus "return discards 'const'" "" { target *-*-* } 85 } */
-/* { dg-bogus "expected" "" { target *-*-* } 85 } */
+/* { dg-bogus "return discards 'const'" "discards" { target *-*-* } 85 } */
+/* { dg-bogus "expected" "expected" { target *-*-* } 85 } */
 }
 
 int f5(__builtin_va_list ap)
@@ -95,6 +95,6 @@ 
 
 int f6(void)
 {
-  return __builtin_offsetof (t23, field); /* { dg-error "unknown type name 't23'" } */
-/* { dg-bogus "request for member" "" { target *-*-* } 98 } */
+  return __builtin_offsetof (t23, field); /* { dg-error "unknown type name 't23'" "t23" } */
+/* { dg-bogus "request for member" "request" { target *-*-* } 98 } */
 }
Index: gcc.dg/mtune.c
===================================================================
--- gcc.dg/mtune.c	(revision 188393)
+++ gcc.dg/mtune.c	(working copy)
@@ -1,8 +1,8 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-mtune=*" } { "" } } */
 /* { dg-options "-mtune=foo" } */
-/* { dg-error "mtune" "" { target *-*-* } 0 } */
-/* { dg-bogus "march" "" { target *-*-* } 0 } */
-/* { dg-bogus "mcpu" "" { target *-*-* } 0 } */
+/* { dg-error "mtune" "mtune" { target *-*-* } 0 } */
+/* { dg-bogus "march" "march" { target *-*-* } 0 } */
+/* { dg-bogus "mcpu" "mcpu" { target *-*-* } 0 } */
 /* { dg-prune-output "note: valid arguments.*" } */
 int i;
Index: gcc.dg/parser-pr28152-2.c
===================================================================
--- gcc.dg/parser-pr28152-2.c	(revision 188393)
+++ gcc.dg/parser-pr28152-2.c	(working copy)
@@ -7,5 +7,5 @@ 
   __complex__ float z;
 
   z = __complex__ (1.90000007326203904e+19, 0.0);   /* { dg-error "__complex__" } */
-  z = __complex__ (1.0e+0, 0.0) / z;   /* { dg-error "__complex__" } */
-  /* { dg-error "at end of input" "" { target *-*-* } 10 } */
+  z = __complex__ (1.0e+0, 0.0) / z;   /* { dg-error "__complex__" "Complex" } */
+  /* { dg-error "at end of input" "end of input" { target *-*-* } 10 } */
Index: gcc.dg/parser-pr28152.c
===================================================================
--- gcc.dg/parser-pr28152.c	(revision 188393)
+++ gcc.dg/parser-pr28152.c	(working copy)
@@ -7,5 +7,5 @@ 
   _Complex float z;
 
   z = _Complex (1.90000007326203904e+19, 0.0);   /* { dg-error "_Complex" } */
-  z = _Complex (1.0e+0, 0.0) / z;   /* { dg-error "_Complex" } */
-  /* { dg-error "at end of input" "" { target *-*-* } 10 } */
+  z = _Complex (1.0e+0, 0.0) / z;   /* { dg-error "_Complex" "_Complex" } */
+  /* { dg-error "at end of input" "end of input" { target *-*-* } 10 } */
Index: gcc.dg/pr14475.c
===================================================================
--- gcc.dg/pr14475.c	(revision 188393)
+++ gcc.dg/pr14475.c	(working copy)
@@ -3,8 +3,8 @@ 
 
 struct tree_common
 {
-  enum tree_code code : 8; /* { dg-error "ISO C forbids forward references to" "" } */
-  /* { dg-error "type of bit-field .code. is a GCC extension" "" { target *-*-* } 6 } */
-  /* { dg-warning "narrower than values of its type" "" { target *-*-* } 6 } */
-  /* { dg-error "incomplete type" "" { target *-*-* } 6 } */
+  enum tree_code code : 8; /* { dg-error "ISO C forbids forward references to" "forward ref" } */
+  /* { dg-error "type of bit-field .code. is a GCC extension" "extension" { target *-*-* } 6 } */
+  /* { dg-warning "narrower than values of its type" "narrower" { target *-*-* } 6 } */
+  /* { dg-error "incomplete type" "incomplete" { target *-*-* } 6 } */
 };
Index: gcc.dg/pr27953.c
===================================================================
--- gcc.dg/pr27953.c	(revision 188393)
+++ gcc.dg/pr27953.c	(working copy)
@@ -1,8 +1,8 @@ 
 /* PR c/27953 */
 
-void foo(struct A a) {}  /* { dg-warning "declared inside parameter list" } */
-/* { dg-warning "its scope is only" "" { target *-*-* } 3 } */
-/* { dg-error "incomplete type" "" { target *-*-* } 3 } */
+void foo(struct A a) {}  /* { dg-warning "declared inside parameter list" "inside" } */
+/* { dg-warning "its scope is only" "scope" { target *-*-* } 3 } */
+/* { dg-error "incomplete type" "incomplete" { target *-*-* } 3 } */
 
-void foo() {}            /* { dg-error "redefinition" } */
-/* { dg-message "note: previous definition" "" { target *-*-* } 3 } */
+void foo() {}            /* { dg-error "redefinition" "redef" } */
+/* { dg-message "note: previous definition" "previous" { target *-*-* } 3 } */
Index: gcc.dg/pr28322-3.c
===================================================================
--- gcc.dg/pr28322-3.c	(revision 188393)
+++ gcc.dg/pr28322-3.c	(working copy)
@@ -6,5 +6,5 @@ 
 {
   int i =  1;
 }
-/* { dg-message "unrecognized command line option .-fno-foobar." "" { target *-*-* } 0 } */
-/* { dg-message "unrecognized command line option .-mno-foobar." "" { target *-*-* } 0 } */
+/* { dg-message "unrecognized command line option .-fno-foobar." "f" { target *-*-* } 0 } */
+/* { dg-message "unrecognized command line option .-mno-foobar." "m" { target *-*-* } 0 } */
Index: gcc.dg/pr30457.c
===================================================================
--- gcc.dg/pr30457.c	(revision 188393)
+++ gcc.dg/pr30457.c	(working copy)
@@ -17,9 +17,9 @@ 
   va_start(ap, paramN); /* { dg-warning "undefined behaviour when second parameter of 'va_start' is declared with 'register' storage" } */
   
   /* Undefined by C99 7.15.1.1p2:  */
-  (void) va_arg(ap, char); /* { dg-warning "'char' is promoted to 'int' when passed through '...'" } */
-  /* { dg-message "note: .so you should pass .int. not .char. to .va_arg.." "" { target *-*-* } 20 } */
-  /* { dg-message "note: if this code is reached, the program will abort"  "" { target *-*-* } 20 } */
+  (void) va_arg(ap, char); /* { dg-warning "'char' is promoted to 'int' when passed through '...'" "promoted" } */
+  /* { dg-message "note: .so you should pass .int. not .char. to .va_arg.." "int not char" { target *-*-* } 20 } */
+  /* { dg-message "note: if this code is reached, the program will abort"  "will abort" { target *-*-* } 20 } */
 
   va_end(ap);
 }
Index: gcc.dg/pr30551-2.c
===================================================================
--- gcc.dg/pr30551-2.c	(revision 188393)
+++ gcc.dg/pr30551-2.c	(working copy)
@@ -2,7 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "" } */
 
-void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." } */
-/* { dg-bogus ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */ 
-/* { dg-bogus "return type of .main. is not .int." "" { target *-*-* } 5 } */ 
+void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." "int" } */
+/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ 
+/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } 5 } */ 
 
Index: gcc.dg/pr30551-3.c
===================================================================
--- gcc.dg/pr30551-3.c	(revision 188393)
+++ gcc.dg/pr30551-3.c	(working copy)
@@ -2,6 +2,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-pedantic-errors" } */
 /* { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } */
-void main(char a) {} /* { dg-error "first argument of .main. should be .int." } */
-/* { dg-error ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */ 
-/* { dg-error "return type of .main. is not .int." "" { target *-*-* } 5 } */ 
+void main(char a) {} /* { dg-error "first argument of .main. should be .int." "int" } */
+/* { dg-error ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ 
+/* { dg-error "return type of .main. is not .int." "return type" { target *-*-* } 5 } */ 
Index: gcc.dg/pr30551-4.c
===================================================================
--- gcc.dg/pr30551-4.c	(revision 188393)
+++ gcc.dg/pr30551-4.c	(working copy)
@@ -2,7 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-pedantic-errors -Wno-main" } */
 
-void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." } */
-/* { dg-bogus ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */ 
-/* { dg-bogus "return type of .main. is not .int." "" { target *-*-* } 5 } */ 
+void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." "int" } */
+/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ 
+/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } 5 } */ 
 
Index: gcc.dg/pr30551-5.c
===================================================================
--- gcc.dg/pr30551-5.c	(revision 188393)
+++ gcc.dg/pr30551-5.c	(working copy)
@@ -2,6 +2,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-pedantic -Wno-main" } */
 
-void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." } */
-/* { dg-bogus ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */ 
-/* { dg-bogus "return type of .main. is not .int." "" { target *-*-* } 5 } */ 
+void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." "int" } */
+/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ 
+/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } 5 } */ 
Index: gcc.dg/pr30551-6.c
===================================================================
--- gcc.dg/pr30551-6.c	(revision 188393)
+++ gcc.dg/pr30551-6.c	(working copy)
@@ -2,6 +2,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-pedantic" } */
 /* { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } */
-void main(char a) {} /* { dg-warning "first argument of .main. should be .int." } */
-/* { dg-warning ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */ 
-/* { dg-warning "return type of .main. is not .int." "" { target *-*-* } 5 } */ 
+void main(char a) {} /* { dg-warning "first argument of .main. should be .int." "int" } */
+/* { dg-warning ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ 
+/* { dg-warning "return type of .main. is not .int." "return type" { target *-*-* } 5 } */ 
Index: gcc.dg/pr30551.c
===================================================================
--- gcc.dg/pr30551.c	(revision 188393)
+++ gcc.dg/pr30551.c	(working copy)
@@ -2,6 +2,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-Wall" } */
 /* { dg-skip-if "-Wmain not enabled with -Wall on SPU" { spu-*-* } } */
-void main(char a) {} /* { dg-warning "first argument of .main. should be .int." } */
-/* { dg-warning ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */ 
-/* { dg-warning "return type of .main. is not .int." "" { target *-*-* } 5 } */ 
+void main(char a) {} /* { dg-warning "first argument of .main. should be .int." "int" } */
+/* { dg-warning ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ 
+/* { dg-warning "return type of .main. is not .int." "return type" { target *-*-* } 5 } */ 
Index: gcc.dg/pr45461.c
===================================================================
--- gcc.dg/pr45461.c	(revision 188393)
+++ gcc.dg/pr45461.c	(working copy)
@@ -9,10 +9,10 @@ 
   short e;
   va_list ap;
   va_start (ap, i);
-  e = va_arg (ap, short);	/* { dg-warning "is promoted" } */
+  e = va_arg (ap, short);	/* { dg-warning "is promoted" "promoted" } */
   va_end (ap);
   return e;
 }
 
-/* { dg-message "note: \\(so you should pass" "" {target *-*-* } 12 } */
-/* { dg-message "note: if this code" "" {target *-*-* } 12 } */
+/* { dg-message "note: \\(so you should pass" "should pass" {target *-*-* } 12 } */
+/* { dg-message "note: if this code" "if this code" {target *-*-* } 12 } */
Index: gcc.dg/pr48552-1.c
===================================================================
--- gcc.dg/pr48552-1.c	(revision 188393)
+++ gcc.dg/pr48552-1.c	(working copy)
@@ -7,15 +7,15 @@ 
 void
 f1 (void *x)
 {
-  __asm volatile ("" : : "r" (*x));	/* { dg-warning "dereferencing" } */
-}					/* { dg-error "invalid use of void expression" "" { target *-*-* } 10 } */
+  __asm volatile ("" : : "r" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}					/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 10 } */
 
 void
 f2 (void *x)
 {
-  __asm volatile ("" : "=r" (*x));	/* { dg-warning "dereferencing" } */
-}					/* { dg-error "invalid use of void expression" "" { target *-*-* } 16 } */
-					/* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 16 } */
+  __asm volatile ("" : "=r" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}					/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 16 } */
+					/* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 16 } */
 void
 f3 (void *x)
 {
@@ -31,15 +31,15 @@ 
 void
 f5 (void *x)
 {
-  __asm volatile ("" : : "g" (*x));	/* { dg-warning "dereferencing" } */
-}					/* { dg-error "invalid use of void expression" "" { target *-*-* } 34 } */
+  __asm volatile ("" : : "g" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}					/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 34 } */
 
 void
 f6 (void *x)
 {
-  __asm volatile ("" : "=g" (*x));	/* { dg-warning "dereferencing" } */
-}					/* { dg-error "invalid use of void expression" "" { target *-*-* } 40 } */
-					/* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 40 } */
+  __asm volatile ("" : "=g" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}					/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 40 } */
+					/* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 40 } */
 void
 f7 (struct S *x)
 {
@@ -49,5 +49,5 @@ 
 void
 f8 (struct S *x)
 {
-  __asm volatile ("" : "=r" (*x));	/* { dg-error "dereferencing pointer to incomplete type" } */
-}					/* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 52 } */
+  __asm volatile ("" : "=r" (*x));	/* { dg-error "dereferencing pointer to incomplete type" "incomplete" } */
+}					/* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 52 } */
Index: gcc.dg/pr48552-2.c
===================================================================
--- gcc.dg/pr48552-2.c	(revision 188393)
+++ gcc.dg/pr48552-2.c	(working copy)
@@ -7,15 +7,15 @@ 
 void
 f1 (void *x)
 {
-  __asm ("" : : "r" (*x));	/* { dg-warning "dereferencing" } */
-}				/* { dg-error "invalid use of void expression" "" { target *-*-* } 10 } */
+  __asm ("" : : "r" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}				/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 10 } */
 
 void
 f2 (void *x)
 {
-  __asm ("" : "=r" (*x));	/* { dg-warning "dereferencing" } */
-}				/* { dg-error "invalid use of void expression" "" { target *-*-* } 16 } */
-				/* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 16 } */
+  __asm ("" : "=r" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}				/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 16 } */
+				/* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 16 } */
 void
 f3 (void *x)
 {
@@ -31,15 +31,15 @@ 
 void
 f5 (void *x)
 {
-  __asm ("" : : "g" (*x));	/* { dg-warning "dereferencing" } */
-}				/* { dg-error "invalid use of void expression" "" { target *-*-* } 34 } */
+  __asm ("" : : "g" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}				/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 34 } */
 
 void
 f6 (void *x)
 {
-  __asm ("" : "=g" (*x));	/* { dg-warning "dereferencing" } */
-}				/* { dg-error "invalid use of void expression" "" { target *-*-* } 40 } */
-				/* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 40 } */
+  __asm ("" : "=g" (*x));	/* { dg-warning "dereferencing" "deref" } */
+}				/* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 40 } */
+				/* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 40 } */
 void
 f7 (struct S *x)
 {
@@ -49,5 +49,5 @@ 
 void
 f8 (struct S *x)
 {
-  __asm ("" : "=r" (*x));	/* { dg-error "dereferencing pointer to incomplete type" } */
-}				/* { dg-error "invalid lvalue in asm output 0" "" { target *-*-* } 52 } */
+  __asm ("" : "=r" (*x));	/* { dg-error "dereferencing pointer to incomplete type" "incomplete" } */
+}				/* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 52 } */
Index: gcc.dg/redecl-1.c
===================================================================
--- gcc.dg/redecl-1.c	(revision 188393)
+++ gcc.dg/redecl-1.c	(working copy)
@@ -52,21 +52,21 @@ 
 
 void prime4(void)
 {
-  bar4();			/* { dg-warning "implicit declaration of function" } */
+  bar4();			/* { dg-warning "implicit declaration of function" "implicit" } */
 }
 
 void test4(void)
 {
   extern double bar4(double);	/* { dg-error "conflict" } */
-/* { dg-message "note: previous implicit declaration" "" { target *-*-* } 55 } */
+/* { dg-message "note: previous implicit declaration" "previous" { target *-*-* } 55 } */
 }
 
 /* Implicit decl, clashing with extern at previous function scope.  */
 
 void prime5(void)
 {
-  extern double bar5(double);	/* { dg-message "note: previous declaration" "" } */
-} /* { dg-message "note: previous implicit declaration" "" { target *-*-* } 68 } */
+  extern double bar5(double);	/* { dg-message "note: previous declaration" "previous 1" } */
+} /* { dg-message "note: previous implicit declaration" "previous 2" { target *-*-* } 68 } */
 
 void test5(void)
 {
Index: gcc.dg/transparent-union-3.c
===================================================================
--- gcc.dg/transparent-union-3.c	(revision 188393)
+++ gcc.dg/transparent-union-3.c	(working copy)
@@ -6,15 +6,15 @@ 
 
 enum e { A };
 
-union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "declaration does not declare anything" } */
-/* { dg-warning "union cannot be made transparent" "" { target *-*-* } 9 } */
-union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" } */
-/* { dg-warning "union cannot be made transparent" "" { target *-*-* } 11 } */
+union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "declaration does not declare anything" "not anything" } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 9 } */
+union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" "not anything" } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 11 } */
 
-union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "declaration does not declare anything" } */
-/* { dg-warning "union cannot be made transparent" "" { target *-*-* } 14 } */
-union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" } */
-/* { dg-warning "union cannot be made transparent" "" { target *-*-* } 16 } */
+union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "declaration does not declare anything" "not anything" } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 14 } */
+union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" "no anything" } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 16 } */
 
 union __attribute__((__transparent_union__)) u1 { };
 /* { dg-warning "union cannot be made transparent" "" { target *-*-* } 19 } */
Index: gcc.dg/utf-dflt.c
===================================================================
--- gcc.dg/utf-dflt.c	(revision 188393)
+++ gcc.dg/utf-dflt.c	(working copy)
@@ -3,10 +3,10 @@ 
 /* { dg-do compile } */
 /* { dg-options "" } */
 
-const unsigned short	c0	= u'a';		/* { dg-error "undeclared" } */
-		/* { dg-error "expected ',' or ';'" "" { target *-*-* } 6 } */
-const unsigned long	c1	= U'a';		/* { dg-error "undeclared" } */
-		/* { dg-error "expected ',' or ';'" "" { target *-*-* } 8 } */
+const unsigned short	c0	= u'a';		/* { dg-error "undeclared" "undeclared" } */
+		/* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 6 } */
+const unsigned long	c1	= U'a';		/* { dg-error "undeclared" "undeclared" } */
+		/* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 8 } */
 
 #define u	1 +
 #define U	2 +
Index: gcc.dg/utf-dflt2.c
===================================================================
--- gcc.dg/utf-dflt2.c	(revision 188393)
+++ gcc.dg/utf-dflt2.c	(working copy)
@@ -2,8 +2,8 @@ 
 /* { dg-do compile } */
 /* { dg-options "" } */
 
-const void	*s0 = u8"a";		/* { dg-error "undeclared" } */
-		/* { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } */
+const void	*s0 = u8"a";		/* { dg-error "undeclared" "undeclared" } */
+		/* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 5 } */
 
 #define u8	"a"
 
Index: gcc.dg/vla-8.c
===================================================================
--- gcc.dg/vla-8.c	(revision 188393)
+++ gcc.dg/vla-8.c	(working copy)
@@ -30,5 +30,5 @@ 
 }
 
 /* Match extra informative notes.  */
-/* { dg-message "note: label '\[^\n'\]*' defined here" "note: expected" { target *-*-* } 0 } */
-/* { dg-message "note: '\[^\n'\]*' declared here" "note: expected" { target *-*-* } 0 } */
+/* { dg-message "note: label '\[^\n'\]*' defined here" "defined" { target *-*-* } 0 } */
+/* { dg-message "note: '\[^\n'\]*' declared here" "declared" { target *-*-* } 0 } */
Index: gcc.dg/vla-init-1.c
===================================================================
--- gcc.dg/vla-init-1.c	(revision 188393)
+++ gcc.dg/vla-init-1.c	(working copy)
@@ -10,6 +10,6 @@ 
 foo (void)
 {
   int x[a] = { 1 }; /* { dg-error "variable-sized object may not be initialized" "VLA init" } */
-  /* { dg-warning "excess elements in array initializer" "" { target *-*-* } 12 } */
-  /* { dg-warning "near initialization" "" { target *-*-* } 12 } */
+  /* { dg-warning "excess elements in array initializer" "excess" { target *-*-* } 12 } */
+  /* { dg-warning "near initialization" "near" { target *-*-* } 12 } */
 }
Index: gcc.dg/wtr-int-type-1.c
===================================================================
--- gcc.dg/wtr-int-type-1.c	(revision 188393)
+++ gcc.dg/wtr-int-type-1.c	(working copy)
@@ -25,8 +25,8 @@ 
 
   /* But this one should, since it doesn't fit in long (long), but
      does fit in unsigned long (long).  */
-  i = 18446744073709551615; /* { dg-warning "integer constant is so large that it is unsigned" "decimal constant" } */
-  /* { dg-warning "this decimal constant would be unsigned in ISO C90" "decimal constant" { target *-*-* } 28 } */
+  i = 18446744073709551615; /* { dg-warning "integer constant is so large that it is unsigned" "so large" } */
+  /* { dg-warning "this decimal constant would be unsigned in ISO C90" "ISO C90" { target *-*-* } 28 } */
 
 # 29 "sys-header.h" 3
 }