aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-06-07 08:46:38 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-06-07 10:54:36 +0200
commit5faaabef3819434d13fcbf749bd07bfc98ca7c3c (patch)
treee589f12b3cde9a181aebb423d60aee643be08f13 /libstdc++-v3
parent00bfc503cc3b3e8f354afeac9b482649418fb70f (diff)
downloadgcc-5faaabef3819434d13fcbf749bd07bfc98ca7c3c.zip
gcc-5faaabef3819434d13fcbf749bd07bfc98ca7c3c.tar.gz
gcc-5faaabef3819434d13fcbf749bd07bfc98ca7c3c.tar.bz2
Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing
Verbatim copy of what was added to 'gcc/testsuite/lib/gcc-dg.exp:gcc-dg-prune' in Subversion r279246 (Git commit a9046e9853024206bec092dd63e21e152cb5cbca) "[MSP430] -Add fno-exceptions multilib". This greatly improves 'make check-target-libstdc++-v3' results for, for example, x86_64-pc-linux-gnu with: RUNTESTFLAGS='--target_board=unix/-fno-exceptions\{,-m32\}' libstdc++-v3/ * testsuite/lib/prune.exp (libstdc++-dg-prune): Support 'UNSUPPORTED: [...]: exception handling disabled'.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/testsuite/lib/prune.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp
index 2d2349e..be6d16c 100644
--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -79,6 +79,18 @@ proc libstdc++-dg-prune { system text } {
# Ignore dsymutil warning (tool bug is actually in the linker)
regsub -all "(^|\n)\[^\n\]*could not find object file symbol for symbol\[^\n\]*" $text "" text
+ # If exceptions are disabled, mark tests expecting exceptions to be enabled
+ # as unsupported.
+ if { ![check_effective_target_exceptions_enabled] } {
+ if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] {
+ return "::unsupported::exception handling disabled"
+ }
+
+ if [regexp "(^|\n)\[^\n\]*: error: #error .__cpp_exceptions." $text] {
+ return "::unsupported::exception handling disabled"
+ }
+ }
+
foreach p $additional_prunes {
if { [string length $p] > 0 } {
# Following regexp matches a complete line containing $p.