libstdc++: XFAIL tests that depends on RTTI
authorJonathan Wakely <jwakely@redhat.com>
Fri, 12 Feb 2021 11:30:38 +0000 (11:30 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 12 Feb 2021 14:30:13 +0000 (14:30 +0000)
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.

libstdc++-v3/testsuite/27_io/basic_ostream/emit/1.cc
libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc

index d692c53b392422e3c19f97a32a648f77af05396d..ac813942a4771196d60d211390e160a937e27dc9 100644 (file)
@@ -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>
index ad7c8ff02329462d61a12673bc352779ed1543e4..2cc477850ce39eac02f37eae85d80f280a226a6f 100644 (file)
@@ -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.
 //