diff mbox

RFA: libstdc++ testsuite PATCH for better error message pruning

Message ID 4C17E2F1.501@redhat.com
State New
Headers show

Commit Message

Jason Merrill June 15, 2010, 8:30 p.m. UTC
Periodically when I go to poke at libstdc++ tests I am frustrated by the 
libstdc++ testsuite's lack of dg-prune-output, which I have found quite 
handy in the gcc testsuite.  So I finally ported it over, along with a 
bunch of the default pruning patterns.  As a result of the latter, a lot 
of the dg-excess-errors lines in the testsuite become unnecessary.

This patch doesn't actually introduce any uses of dg-prune-output, 
that'll come later

OK for trunk?

Comments

Paolo Carlini June 15, 2010, 9 p.m. UTC | #1
On 06/15/2010 10:30 PM, Jason Merrill wrote:
> Periodically when I go to poke at libstdc++ tests I am frustrated by
> the libstdc++ testsuite's lack of dg-prune-output, which I have found
> quite handy in the gcc testsuite.  So I finally ported it over, along
> with a bunch of the default pruning patterns.  As a result of the
> latter, a lot of the dg-excess-errors lines in the testsuite become
> unnecessary.
>
> This patch doesn't actually introduce any uses of dg-prune-output,
> that'll come later
OK, thanks.

Paolo.
diff mbox

Patch

commit 0e1ca8c52293e9a2b14db895c0bd465e0f698d56
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Jun 15 12:48:29 2010 -0400

    	* testsuite/lib/libstdc++.exp: Set additional_prunes.
    	(libstdc++-dg-test): Don't prune here.
    	* testsuite/lib/prune.exp (dg-prune-output): New.
    	(libstdc++-dg-prune): Rename from prune_g++_output.
    	Add a bunch of prunes from gcc's prune.exp.

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 45a43de..33dc120 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -374,7 +374,6 @@  proc libstdc++-dg-test { prog do_what extra_tool_flags } {
     # There is a libstdc++_compile made for us by default (via the tool-
     # and-target file), but the defaults are lacking in goodness.
     set comp_output [$select_compile "$prog" "$output_file" "$compile_type" $options];
-    set comp_output [ prune_g++_output $comp_output ];
 
     return [list $comp_output $output_file]
 }
@@ -386,13 +385,16 @@  if { [info procs saved-dg-test] == [list] } {
     rename dg-test saved-dg-test
 
     proc dg-test { args } {
+	global additional_prunes
 	global errorInfo
 
 	if { [ catch { eval saved-dg-test $args } errmsg ] } {
 	    set saved_info $errorInfo
+	    set additional_prunes ""
 	    unset_timeout_vars
 	    error $errmsg $saved_info
 	}
+	set additional_prunes ""
 	unset_timeout_vars
     }
 }
@@ -1470,3 +1472,5 @@  proc check_v3_target_binary_io { } {
     verbose "check_v3_target_binary_io: $et_binary_io" 2
     return $et_binary_io
 }
+
+set additional_prunes ""
diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp
index 6c7368d..a390878 100644
--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -17,18 +17,45 @@ 
 
 # Prune messages from g++ that aren't useful.
 
-proc prune_g++_output { text } {
+# Prune any messages matching ARGS[1] (a regexp) from test output.
+proc dg-prune-output { args } {
+    global additional_prunes
+
+    if { [llength $args] != 2 } {
+	error "[lindex $args 1]: need one argument"
+	return
+    }
+
+    lappend additional_prunes [lindex $args 1]
+}
+
+proc libstdc++-dg-prune { system text } {
+    global additional_prunes
 
     # Cygwin warns about -ffunction-sections
     regsub -all "(^|\n)\[^\n\]*: -ffunction-sections may affect debugging on some targets\[^\n\]*" $text "" text
 
     # Remove parts of warnings that refer to location of previous
     # definitions, etc as these confuse dejagnu
-    regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text
+    regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data)\[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*:   (recursively )?instantiated from \[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*:   . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text
+    regsub -all "(^|\n)    inlined from \[^\n\]*" $text "" text
+    # Why doesn't GCC need these to strip header context?
+    regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[ \t\]*from \[^\n\]*" $text "" text
 
     # Ignore errata warning from IA64 assembler.
     regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
     regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
 
+    foreach p $additional_prunes {
+	if { [string length $p] > 0 } {
+	    # Following regexp matches a complete line containing $p.
+	    regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
+	}
+    }
+
     return $text
 }
diff --git a/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc b/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
index e764fbb..264e1a3 100644
--- a/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdbool>  // { dg-excess-errors "In file included from" }
+#include <cstdbool>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc b/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
index 569dc67..fdbb1da 100644
--- a/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdint>  // { dg-excess-errors "In file included from" }
+#include <cstdint>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
index e09ab75..3b74f7e 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
@@ -27,12 +27,10 @@  int main()
   bool test __attribute__((unused)) = true;
 
   __gnu_test::test_category c1;
-  __gnu_test::test_category c2(c1); 
+  __gnu_test::test_category c2(c1); // { dg-error "first required here" }
 
   return 0;
 }
 
 // { dg-error "deleted function" "" { target *-*-* } 72 }
 // { dg-error "used here" "" { target *-*-* } 30 }
-// { dg-error "first required here" "" { target *-*-* } 30 }
-// { dg-excess-errors "copy constructor" }
diff --git a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
index e9294bf..46f046d 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
@@ -17,7 +17,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <system_error>  // { dg-excess-errors "In file included from" }
+#include <system_error>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
index 727f1c4..115c323 100644
--- a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
@@ -20,12 +20,10 @@ 
 // <http://www.gnu.org/licenses/>.
 
 // { dg-error "static assertion failed" "" { target *-*-* } 676 }
-// { dg-error "instantiated from here" "" { target *-*-* } 30 }
-// { dg-excess-errors "In function" }
 
 #include <utility>
 
 void test01()
 {
-  std::declval<int>();
+  std::declval<int>();		// { dg-error "instantiated from here" }
 }
diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc
index 297b5cb..98a35f1 100644
--- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc
@@ -33,4 +33,3 @@  void test01()
 
 // { dg-error "rep cannot be a duration" "" { target *-*-* } 203 }
 // { dg-error "instantiated from here" "" { target *-*-* } 31 }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc
index b422440..86f3493 100644
--- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc
@@ -35,4 +35,3 @@  void test01()
 
 // { dg-error "period must be positive" "" { target *-*-* } 206 }
 // { dg-error "instantiated from here" "" { target *-*-* } 33 }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc b/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
index 7d83fd9..e596b6a 100644
--- a/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <type_traits>  // { dg-excess-errors "In file included from" }
+#include <type_traits>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 8f62662..8953dac 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -50,6 +50,3 @@  void test01()
 
 // { dg-error "invalid use of incomplete type" "" { target *-*-* } 639 }
 // { dg-error "declaration of" "" { target *-*-* } 603 }
-
-// { dg-excess-errors "At global scope" }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index 3648236..e06005d 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -50,6 +50,3 @@  void test01()
 
 // { dg-error "invalid use of incomplete type" "" { target *-*-* } 562 }
 // { dg-error "declaration of" "" { target *-*-* } 526 }
-
-// { dg-excess-errors "At global scope" }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
index 03c2c1f..eee2644 100644
--- a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
@@ -51,4 +51,3 @@  test04()
 // { dg-error "instantiated from here" "" { target *-*-* } 46 }
 // { dg-error "denominator cannot be zero" "" { target *-*-* } 153 }
 // { dg-error "out of range" "" { target *-*-* } 154 }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc
index 4d9d1a6..e0d09de 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc
@@ -20,7 +20,7 @@ 
 
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
-#include <memory>  // { dg-excess-errors "In file included from" }
+#include <memory>
 #include <testsuite_hooks.h>
 
 struct A { };
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820.cc
index c9c7584..09be153 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820.cc
@@ -38,5 +38,3 @@  void test01()
   // { dg-error "incomplete" "" { target *-*-* } 657 }
 
 }
-
-// { dg-excess-errors "" }
diff --git a/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc b/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
index 3c47ae2..5d9bf7e 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <array>  // { dg-excess-errors "In file included from" }
+#include <array>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc b/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
index 89f850c..266874d 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <tuple>  // { dg-excess-errors "In file included from" }
+#include <tuple>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc b/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
index 65f05e1..dc85bc5 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <unordered_map>  // { dg-excess-errors "In file included from" }
+#include <unordered_map>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc b/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
index 3dabc32..ab22c39 100644
--- a/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <unordered_set>  // { dg-excess-errors "In file included from" }
+#include <unordered_set>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
index f447578..d81271a 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <ccomplex>  // { dg-excess-errors "In file included from" }
+#include <ccomplex>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
index c457375..a353da9 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cfenv>  // { dg-excess-errors "In file included from" }
+#include <cfenv>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
index f1f2a77..1517588 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <ctgmath>  // { dg-excess-errors "In file included from" }
+#include <ctgmath>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
index 6463f52..4131196 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <random>  // { dg-excess-errors "In file included from" }
+#include <random>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc b/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
index 8ba12fb..b59638f 100644
--- a/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cinttypes>  // { dg-excess-errors "In file included from" }
+#include <cinttypes>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc b/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
index cf4e4d8..3afec89 100644
--- a/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <regex>  // { dg-excess-errors "In file included from" }
+#include <regex>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
index 26d0d03..d70a66c 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
@@ -44,4 +44,3 @@  int main()
 // { dg-error "deleted function" "" { target *-*-* } 445 }
 // { dg-error "deleted function" "" { target *-*-* } 463 }
 // { dg-error "deleted function" "" { target *-*-* } 481 }
-// { dg-excess-errors "In member function" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
index 49cbc02..974c947 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
@@ -31,4 +31,3 @@  int main()
 // { dg-error "operator" "" { target *-*-* } 376 }
 // { dg-error "operator" "" { target *-*-* } 377 }
 // { dg-error "operator" "" { target *-*-* } 378 }
-// { dg-excess-errors "In file included from" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
index e5c9dfc..4927fcf 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
@@ -31,4 +31,3 @@  int main()
 // { dg-error "operator" "" { target *-*-* } 354 }
 // { dg-error "operator" "" { target *-*-* } 355 }
 // { dg-error "operator" "" { target *-*-* } 356 }
-// { dg-excess-errors "In file included from" }
diff --git a/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc b/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
index d1e7231..e31e91f 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <condition_variable>  // { dg-excess-errors "In file included from" }
+#include <condition_variable>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc b/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
index 5f021b8..b9fb18d 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <future>  // { dg-excess-errors "In file included from" }
+#include <future>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc b/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
index 5d2a70b..ed993d5 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
@@ -18,7 +18,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <mutex>  // { dg-excess-errors "In file included from" }
+#include <mutex>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
diff --git a/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc b/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
index 9d86cce..d056c02 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
@@ -20,6 +20,6 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <thread>  // { dg-excess-errors "In file included from" }
+#include <thread>
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 }
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
index 8d93029..9577dfb 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
@@ -61,4 +61,3 @@  int main()
 }
 
 // { dg-error "invalid" "" { target *-*-* } 187 } 
-// { dg-excess-errors "member function" } 
diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc
index 01c6714..4b30661 100644
--- a/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc
+++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc
@@ -23,4 +23,3 @@ 
 #include <vector>
 
 // { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 167 }
-// { dg-excess-errors "In file included from" }
diff --git a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
index 36fb972..de72e14 100644
--- a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
+++ b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
@@ -36,4 +36,3 @@  int main()
 
 // { dg-error "instantiated from" "" { target *-*-* } 28 } 
 // { dg-error "no type" "" { target *-*-* } 67 } 
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
index 7c88b43..847beda 100644
--- a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
+++ b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
@@ -36,4 +36,3 @@  int main()
 
 // { dg-error "instantiated from" "" { target *-*-* } 28 }
 // { dg-error "no type" "" { target *-*-* } 110 }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/assign/shared_ptr_neg.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/assign/shared_ptr_neg.cc
index ec05d71..490cfc4 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/assign/shared_ptr_neg.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/assign/shared_ptr_neg.cc
@@ -19,7 +19,7 @@ 
 
 // TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]
 
-#include <tr1/memory>  // { dg-excess-errors "In file included from" }
+#include <tr1/memory>
 #include <testsuite_hooks.h>
 
 struct A { };
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc
index b5fe356..a80a2ee 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc
@@ -36,5 +36,3 @@  void test01()
   // { dg-error "incomplete" "" { target *-*-* } 409 }
 
 }
-
-// { dg-excess-errors "" }