+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.
// 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 }
// 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 }
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" }
// 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 }
// <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" }
}
// { dg-error "rep cannot be a duration" "" { target *-*-* } 203 }
// { dg-error "instantiated from here" "" { target *-*-* } 31 }
-// { dg-excess-errors "In instantiation of" }
// { dg-error "period must be positive" "" { target *-*-* } 206 }
// { dg-error "instantiated from here" "" { target *-*-* } 33 }
-// { dg-excess-errors "In instantiation of" }
// 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 }
// { 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" }
// { 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" }
// { 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" }
// 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 { };
// { dg-error "incomplete" "" { target *-*-* } 657 }
}
-
-// { dg-excess-errors "" }
// 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 }
// 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 }
// 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 }
// 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 }
// 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 }
// 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 }
// 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 }
// 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 }
// 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 }
// 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 }
// { dg-error "deleted function" "" { target *-*-* } 445 }
// { dg-error "deleted function" "" { target *-*-* } 463 }
// { dg-error "deleted function" "" { target *-*-* } 481 }
-// { dg-excess-errors "In member function" }
// { dg-error "operator" "" { target *-*-* } 376 }
// { dg-error "operator" "" { target *-*-* } 377 }
// { dg-error "operator" "" { target *-*-* } 378 }
-// { dg-excess-errors "In file included from" }
// { dg-error "operator" "" { target *-*-* } 354 }
// { dg-error "operator" "" { target *-*-* } 355 }
// { dg-error "operator" "" { target *-*-* } 356 }
-// { dg-excess-errors "In file included from" }
// 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 }
// 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 }
// 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 }
// 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 }
}
// { dg-error "invalid" "" { target *-*-* } 187 }
-// { dg-excess-errors "member function" }
#include <vector>
// { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 167 }
-// { dg-excess-errors "In file included from" }
// { dg-error "instantiated from" "" { target *-*-* } 28 }
// { dg-error "no type" "" { target *-*-* } 67 }
-// { dg-excess-errors "In instantiation of" }
// { dg-error "instantiated from" "" { target *-*-* } 28 }
// { dg-error "no type" "" { target *-*-* } 110 }
-// { dg-excess-errors "In instantiation of" }
# 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]
}
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
}
}
verbose "check_v3_target_binary_io: $et_binary_io" 2
return $et_binary_io
}
+
+set additional_prunes ""
# 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
}
// 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 { };
// { dg-error "incomplete" "" { target *-*-* } 409 }
}
-
-// { dg-excess-errors "" }