This test modifies dg-message 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 <jani...@codesourcery.com> * gcc.dg/cpp/include2a.c: Add comments to checks for multiple messages reported for one line of source code. * gcc.dg/cpp/pr30786.c: Likewise. * gcc.dg/cpp/pr28709.c: Likewise. * gcc.dg/cpp/missing-header-MD.c: Likewise. * gcc.dg/cpp/macspace2.c: Likewise. * gcc.dg/cpp/missing-header-1.c: Likewise. * gcc.dg/cpp/missing-header-MMD.c: Likewise. * gcc.dg/cpp/missing-sysheader-MD.c: Likewise. * gcc.dg/cpp/missing-sysheader-MMD.c: Likewise. Index: gcc.dg/cpp/include2a.c =================================================================== --- gcc.dg/cpp/include2a.c (revision 188249) +++ gcc.dg/cpp/include2a.c (working copy) @@ -11,6 +11,6 @@ /* These error is No such file or directory, just once. However, this message is locale-dependent, so don't test for it. */ -/* { dg-error "silly" "" { target *-*-* } 0 } */ -/* { dg-error "missing" "" { target *-*-* } 0 } */ -/* { dg-message "terminated" "" { target *-*-* } 0 } */ +/* { dg-error "silly" "silly" { target *-*-* } 0 } */ +/* { dg-error "missing" "missing" { target *-*-* } 0 } */ +/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */ Index: gcc.dg/cpp/pr30786.c =================================================================== --- gcc.dg/cpp/pr30786.c (revision 188249) +++ gcc.dg/cpp/pr30786.c (working copy) @@ -1,8 +1,8 @@ /* PR preprocessor/30786 - _Pragma at end of file should not ICE */ /* { dg-do compile } */ -/* { dg-error "parenthesized" "" { target *-*-* } 9 } */ -/* { dg-error "expected" "" { target *-*-* } 9 } */ +/* { dg-error "parenthesized" "parenthesized" { target *-*-* } 9 } */ +/* { dg-error "expected" "expected" { target *-*-* } 9 } */ int x; Index: gcc.dg/cpp/pr28709.c =================================================================== --- gcc.dg/cpp/pr28709.c (revision 188249) +++ gcc.dg/cpp/pr28709.c (working copy) @@ -6,5 +6,5 @@ #define foo - ## >> foo; -/* { dg-error "expected identifier.*'-'" "" { target *-*-* } 8 } */ -/* { dg-error pasting "" { target *-*-* } 8 } */ +/* { dg-error "expected identifier.*'-'" "expected" { target *-*-* } 8 } */ +/* { dg-error pasting "pasting" { target *-*-* } 8 } */ Index: gcc.dg/cpp/missing-header-MD.c =================================================================== --- gcc.dg/cpp/missing-header-MD.c (revision 188249) +++ gcc.dg/cpp/missing-header-MD.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "-MD" } */ #include "nonexistent.h" -/* { dg-message "nonexistent.h" "" { target *-*-* } 0 } */ -/* { dg-message "terminated" "" { target *-*-* } 0 } */ +/* { dg-message "nonexistent.h" "nonexistent.h" { target *-*-* } 0 } */ +/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */ /* This declaration should not receive any diagnostic. */ foo bar; Index: gcc.dg/cpp/macspace2.c =================================================================== --- gcc.dg/cpp/macspace2.c (revision 188249) +++ gcc.dg/cpp/macspace2.c (working copy) @@ -59,5 +59,5 @@ #define ag"abc" /* { dg-error "requires whitespace" } */ int dummy; -/* { dg-error "missing terminating" "" { target *-*-* } 6 } */ -/* { dg-error "missing terminating" "" { target *-*-* } 10 } */ +/* { dg-error "missing terminating" "missing-terminating" { target *-*-* } 6 } */ +/* { dg-error "missing terminating" "missing-terminating" { target *-*-* } 10 } */ Index: gcc.dg/cpp/missing-header-1.c =================================================================== --- gcc.dg/cpp/missing-header-1.c (revision 188249) +++ gcc.dg/cpp/missing-header-1.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "" } */ #include "nonexistent.h" -/* { dg-message "nonexistent.h" "" { target *-*-* } 0 } */ -/* { dg-message "terminated" "" { target *-*-* } 0 } */ +/* { dg-message "nonexistent.h" "nonexistent.h" { target *-*-* } 0 } */ +/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */ /* This declaration should not receive any diagnostic. */ foo bar; Index: gcc.dg/cpp/missing-header-MMD.c =================================================================== --- gcc.dg/cpp/missing-header-MMD.c (revision 188249) +++ gcc.dg/cpp/missing-header-MMD.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "-MMD" } */ #include "nonexistent.h" -/* { dg-message "nonexistent.h" "" { target *-*-* } 0 } */ -/* { dg-message "terminated" "" { target *-*-* } 0 } */ +/* { dg-message "nonexistent.h" "nonexistent.h" { target *-*-* } 0 } */ +/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */ /* This declaration should not receive any diagnostic. */ foo bar; Index: gcc.dg/cpp/missing-sysheader-MD.c =================================================================== --- gcc.dg/cpp/missing-sysheader-MD.c (revision 188249) +++ gcc.dg/cpp/missing-sysheader-MD.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "-MD" } */ #include <nonexistent.h> -/* { dg-message "nonexistent.h" "" { target *-*-* } 0 } */ -/* { dg-message "terminated" "" { target *-*-* } 0 } */ +/* { dg-message "nonexistent.h" "nonexistent.h" { target *-*-* } 0 } */ +/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */ /* This declaration should not receive any diagnostic. */ foo bar; Index: gcc.dg/cpp/missing-sysheader-MMD.c =================================================================== --- gcc.dg/cpp/missing-sysheader-MMD.c (revision 188249) +++ gcc.dg/cpp/missing-sysheader-MMD.c (working copy) @@ -3,8 +3,8 @@ /* { dg-options "-MMD" } */ #include <nonexistent.h> -/* { dg-message "nonexistent.h" "" { target *-*-* } 0 } */ -/* { dg-message "terminated" "" { target *-*-* } 0 } */ +/* { dg-message "nonexistent.h" "nonexistent.h" { target *-*-* } 0 } */ +/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */ /* This declaration should not receive any diagnostic. */ foo bar;