aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.dg/compat/eh/filter2_y.C6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/eh/filter2_y.C b/gcc/testsuite/g++.dg/compat/eh/filter2_y.C
index 87c6fea..67a4ffe 100644
--- a/gcc/testsuite/g++.dg/compat/eh/filter2_y.C
+++ b/gcc/testsuite/g++.dg/compat/eh/filter2_y.C
@@ -9,6 +9,12 @@ struct a
a () { }
~a ()
+#if __cplusplus >= 201103L
+ // Give this destructor a potentially-throwing exception specification so
+ // that we verify std::terminate gets called due to an exception during
+ // unwinding, not just because the destructor is noexcept.
+ noexcept(false)
+#endif
{
try
{