* testsuite/lib/libstdc++.exp: Set additional_prunes.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Jun 2010 21:05:22 +0000 (21:05 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Jun 2010 21:05:22 +0000 (21:05 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160812 138bc75d-0d04-0410-961f-82ee72b054a4

39 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc
libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc
libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc
libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820.cc
libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc
libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
libstdc++-v3/testsuite/lib/libstdc++.exp
libstdc++-v3/testsuite/lib/prune.exp
libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/assign/shared_ptr_neg.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc

index 8833723..d231ba2 100644 (file)
@@ -1,3 +1,47 @@
+2010-06-15  Jason Merrill  <jason@redhat.com>
+
+       * 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.
+       * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Remove dg-excess-errors.
+       * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc: Likewise.
+       * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Likewise.
+       * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc: Likewise.
+       * testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
+       * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
+       * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
+       * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc: Likewise.
+       * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
+       * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Likewise.
+       * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.
+       * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise.
+       * testsuite/20_util/shared_ptr/cons/43820.cc: Likewise.
+       * testsuite/23_containers/headers/array/std_c++0x_neg.cc: Likewise.
+       * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc: Likewise.
+       * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc: Likewise.
+       * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc: Likewise.
+       * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Likewise.
+       * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc: Likewise.
+       * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Likewise.
+       * testsuite/26_numerics/headers/random/std_c++0x_neg.cc: Likewise.
+       * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
+       * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
+       * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
+       * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Likewise.
+       * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Likewise.
+       * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: Likewise.
+       * testsuite/30_threads/headers/future/std_c++0x_neg.cc: Likewise.
+       * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
+       * testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
+       * testsuite/ext/pb_ds/example/hash_resize_neg.cc: Likewise.
+       * testsuite/ext/profile/mutex_extensions.cc: Likewise.
+       * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
+       * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
+       * testsuite/tr1/2_general_utilities/shared_ptr/assign/shared_ptr_neg.cc: Likewise.
+       * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc: Likewise.
+
 2010-06-13  Paolo Carlini <paolo.carlini@oracle.com>
 
        * include/parallel/base.h (min, max): Mark inline.
index e764fbb..264e1a3 100644 (file)
@@ -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 } 
 
index 569dc67..fdbb1da 100644 (file)
@@ -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 } 
 
index e09ab75..3b74f7e 100644 (file)
@@ -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" }
index e9294bf..46f046d 100644 (file)
@@ -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 } 
 
index 727f1c4..115c323 100644 (file)
 // <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" }
 }
index 297b5cb..98a35f1 100644 (file)
@@ -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" }
index b422440..86f3493 100644 (file)
@@ -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" }
index 7d83fd9..e596b6a 100644 (file)
@@ -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 } 
 
index 8f62662..8953dac 100644 (file)
@@ -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" }
index 3648236..e06005d 100644 (file)
@@ -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" }
index 03c2c1f..eee2644 100644 (file)
@@ -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" }
index 4d9d1a6..e0d09de 100644 (file)
@@ -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 { };
index c9c7584..09be153 100644 (file)
@@ -38,5 +38,3 @@ void test01()
   // { dg-error "incomplete" "" { target *-*-* } 657 }
 
 }
-
-// { dg-excess-errors "" }
index 3c47ae2..5d9bf7e 100644 (file)
@@ -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 } 
 
index 89f850c..266874d 100644 (file)
@@ -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 } 
 
index 65f05e1..dc85bc5 100644 (file)
@@ -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 } 
 
index 3dabc32..ab22c39 100644 (file)
@@ -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 } 
 
index f447578..d81271a 100644 (file)
@@ -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 } 
 
index c457375..a353da9 100644 (file)
@@ -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 } 
 
index f1f2a77..1517588 100644 (file)
@@ -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 } 
 
index 6463f52..4131196 100644 (file)
@@ -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 } 
 
index 8ba12fb..b59638f 100644 (file)
@@ -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 } 
 
index cf4e4d8..3afec89 100644 (file)
@@ -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 } 
 
index 26d0d03..d70a66c 100644 (file)
@@ -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" }
index 49cbc02..974c947 100644 (file)
@@ -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" }
index e5c9dfc..4927fcf 100644 (file)
@@ -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" }
index d1e7231..e31e91f 100644 (file)
@@ -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 } 
 
index 5f021b8..b9fb18d 100644 (file)
@@ -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 } 
 
index 5d2a70b..ed993d5 100644 (file)
@@ -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 } 
 
index 9d86cce..d056c02 100644 (file)
@@ -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 }
index 8d93029..9577dfb 100644 (file)
@@ -61,4 +61,3 @@ int main()
 }
 
 // { dg-error "invalid" "" { target *-*-* } 187 } 
-// { dg-excess-errors "member function" } 
index 01c6714..4b30661 100644 (file)
@@ -23,4 +23,3 @@
 #include <vector>
 
 // { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 167 }
-// { dg-excess-errors "In file included from" }
index 36fb972..de72e14 100644 (file)
@@ -36,4 +36,3 @@ int main()
 
 // { dg-error "instantiated from" "" { target *-*-* } 28 } 
 // { dg-error "no type" "" { target *-*-* } 67 } 
-// { dg-excess-errors "In instantiation of" }
index 7c88b43..847beda 100644 (file)
@@ -36,4 +36,3 @@ int main()
 
 // { dg-error "instantiated from" "" { target *-*-* } 28 }
 // { dg-error "no type" "" { target *-*-* } 110 }
-// { dg-excess-errors "In instantiation of" }
index 45a43de..33dc120 100644 (file)
@@ -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 ""
index 6c7368d..a390878 100644 (file)
 
 # 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
 }
index ec05d71..490cfc4 100644 (file)
@@ -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 { };