diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-02-12 11:30:38 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-02-12 14:30:13 +0000 |
commit | c4ece1d96a105f51d7999b7afe9340d582731f5d (patch) | |
tree | a49d76452a2c7337ff670c6297b7170c5f3770c1 | |
parent | 0bd242ec5aeffd1fb2a3ee16a2c69afae2aff2ce (diff) | |
download | gcc-c4ece1d96a105f51d7999b7afe9340d582731f5d.zip gcc-c4ece1d96a105f51d7999b7afe9340d582731f5d.tar.gz gcc-c4ece1d96a105f51d7999b7afe9340d582731f5d.tar.bz2 |
libstdc++: XFAIL tests that depends on RTTI
The std::emit_on_flush manipulator depends on dynamic_cast, so fails
without RTTI.
The std::async code can't catch a forced_unwind exception when RTTI is
disabled, so it can't rethrow it either, and the test aborts.
libstdc++-v3/ChangeLog:
* testsuite/27_io/basic_ostream/emit/1.cc: Expect test to fail
if -fno-rtti is used.
* testsuite/30_threads/async/forced_unwind.cc: Expect test
to abort if -fno-rtti is used.
-rw-r--r-- | libstdc++-v3/testsuite/27_io/basic_ostream/emit/1.cc | 1 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/emit/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/emit/1.cc index d692c53..ac81394 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/emit/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/emit/1.cc @@ -19,6 +19,7 @@ // { dg-additional-options "-pthread" { target pthread } } // { dg-do run { target c++2a } } // { dg-require-effective-target cxx11-abi } +// { dg-xfail-run-if "cannot catch forced_unwind" { *-*-* } { "-fno-rtti" } } #include <syncstream> #include <testsuite_hooks.h> diff --git a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc index ad7c8ff..2cc4778 100644 --- a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc +++ b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc @@ -3,6 +3,7 @@ // { dg-require-effective-target c++11 } // { dg-require-effective-target pthread } // { dg-require-gthreads "" } +// { dg-xfail-run-if "cannot catch forced_unwind" { *-*-* } { "-fno-rtti" } } // Copyright (C) 2014-2021 Free Software Foundation, Inc. // |