summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
new file mode 100644
index 000000000..0c94b554f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
@@ -0,0 +1,17 @@
+// PR c++/47263
+// PR c++/49260
+// { dg-options "-std=c++0x -fno-asynchronous-unwind-tables -fno-dwarf2-cfi-asm" }
+// { dg-do run }
+
+#include <exception>
+
+int main( void )
+{
+ std::set_unexpected( []{ throw 0; } );
+ try
+ {
+ []() throw( int ) { throw nullptr; }();
+ }
+ catch( int )
+ { }
+}