diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-06-07 16:11:11 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-11-03 11:59:15 +0100 |
commit | e5919951b8cb0dc8af5b80dc747416fb60a9835b (patch) | |
tree | 6d6a5bcc4af4463652a31c86790190074ae1072c /gcc | |
parent | fe65f4a2a39b389a4240dc59d856b082c0b5ad96 (diff) | |
download | gcc-e5919951b8cb0dc8af5b80dc747416fb60a9835b.zip gcc-e5919951b8cb0dc8af5b80dc747416fb60a9835b.tar.gz gcc-e5919951b8cb0dc8af5b80dc747416fb60a9835b.tar.bz2 |
Skip a number of 'g++.dg/compat/' test cases for '-fno-exceptions' testing
Running 'make check' with: 'RUNTESTFLAGS=--target_board=unix/-fno-exceptions',
'error: exception handling disabled' is triggered for C++ 'throw' etc. usage,
and per 'gcc/testsuite/lib/gcc-dg.exp:gcc-dg-prune':
# 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"
}
..., which generally means:
-PASS: [...] (test for excess errors)
+UNSUPPORTED: [...]: exception handling disabled
However, this doesn't work for "split files" test cases. For example:
PASS: g++.dg/compat/eh/ctor1 cp_compat_main_tst.o compile
[-PASS:-]{+UNSUPPORTED:+} g++.dg/compat/eh/ctor1 cp_compat_x_tst.o [-compile-]{+compile: exception handling disabled+}
[-PASS:-]{+UNSUPPORTED:+} g++.dg/compat/eh/ctor1 cp_compat_y_tst.o [-compile-]{+compile: exception handling disabled+}
[-PASS:-]{+UNRESOLVED:+} g++.dg/compat/eh/ctor1 cp_compat_x_tst.o-cp_compat_y_tst.o link
[-PASS:-]{+UNRESOLVED:+} g++.dg/compat/eh/ctor1 cp_compat_x_tst.o-cp_compat_y_tst.o execute
The "compile"/"assemble" tests (either continue to work, or) result in the
expected 'UNSUPPORTED: [...] compile: exception handling disabled', but
dependent "link" and "execute" tests then turn UNRESOLVED.
Specify 'dg-require-effective-target exceptions_enabled' for those test cases.
gcc/testsuite/
* g++.dg/compat/eh/ctor1_main.C: Specify
'dg-require-effective-target exceptions_enabled'.
* g++.dg/compat/eh/ctor2_main.C: Likewise.
* g++.dg/compat/eh/dtor1_main.C: Likewise.
* g++.dg/compat/eh/filter1_main.C: Likewise.
* g++.dg/compat/eh/filter2_main.C: Likewise.
* g++.dg/compat/eh/new1_main.C: Likewise.
* g++.dg/compat/eh/nrv1_main.C: Likewise.
* g++.dg/compat/eh/spec3_main.C: Likewise.
* g++.dg/compat/eh/template1_main.C: Likewise.
* g++.dg/compat/eh/unexpected1_main.C: Likewise.
* g++.dg/compat/init/array5_main.C: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/ctor1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/ctor2_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/dtor1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/filter1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/filter2_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/new1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/nrv1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/spec3_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/template1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/init/array5_main.C | 2 |
11 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C b/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C index a188b46..1598d9d 100644 --- a/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C @@ -4,6 +4,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void ctor1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C b/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C index 58836e2..f79c8a2 100644 --- a/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C @@ -4,6 +4,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void ctor2_x (void); int main () diff --git a/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C b/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C index 962fa64..1550d74 100644 --- a/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C @@ -5,6 +5,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void dtor1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/filter1_main.C b/gcc/testsuite/g++.dg/compat/eh/filter1_main.C index 2a8fca4..39eb6e4 100644 --- a/gcc/testsuite/g++.dg/compat/eh/filter1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/filter1_main.C @@ -2,6 +2,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void filter1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/filter2_main.C b/gcc/testsuite/g++.dg/compat/eh/filter2_main.C index 866199c..43ecf8a 100644 --- a/gcc/testsuite/g++.dg/compat/eh/filter2_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/filter2_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void filter2_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/new1_main.C b/gcc/testsuite/g++.dg/compat/eh/new1_main.C index ee4cad8..a557c9d 100644 --- a/gcc/testsuite/g++.dg/compat/eh/new1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/new1_main.C @@ -4,6 +4,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void new1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C b/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C index 3b76b5c..5df3c51 100644 --- a/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void nrv1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/spec3_main.C b/gcc/testsuite/g++.dg/compat/eh/spec3_main.C index 3f0e919..8255fc1 100644 --- a/gcc/testsuite/g++.dg/compat/eh/spec3_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/spec3_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void spec3_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/template1_main.C b/gcc/testsuite/g++.dg/compat/eh/template1_main.C index 2d16980..5ff1327 100644 --- a/gcc/testsuite/g++.dg/compat/eh/template1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/template1_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void template1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C b/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C index 1658db7..99e667d 100644 --- a/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void unexpected1_x (); int diff --git a/gcc/testsuite/g++.dg/compat/init/array5_main.C b/gcc/testsuite/g++.dg/compat/init/array5_main.C index 96b2cc4..814411e 100644 --- a/gcc/testsuite/g++.dg/compat/init/array5_main.C +++ b/gcc/testsuite/g++.dg/compat/init/array5_main.C @@ -5,6 +5,8 @@ // Incorrect construction and destruction of multi-dimensional // array of class. +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void array5_x (void); int |