--- /dev/null
+// Test that inlining a destructor with a catch block doesn't confuse the
+// enclosing try block.
+// Special g++ Options: -O
+
+struct A {
+ ~A()
+ {
+ try { throw 1; }
+ catch (...) { }
+ }
+};
+
+int main ()
+{
+ try
+ {
+ A a;
+ throw 42;
+ }
+ catch (int i)
+ {
+ return (i != 42);
+ }
+}
--- /dev/null
+// Test that an unhandled exception causes us to call terminate.
+
+#include <exception>
+#include <cstdlib>
+
+void my_terminate ()
+{
+ std::exit (0);
+}
+
+int main (void)
+{
+ std::set_terminate (my_terminate);
+ throw 1;
+ return 1;
+}