We have seen several regressions and PRs with respect to this. It is possible to workaround this by using:
/* { dg-bogus "message.*message" } */ /* { dg-warning "message" "" { target *-*-* } 1 } */ However, the test must be alone in one file. Otherwise, strange things may happen. This is obviously very cumbersome and not practical in the long run. -- Summary: Testsuite cannot detect duplicated error/warning messages Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: manu at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30612