1 // HP-UX libunwind.so doesn't provide _Unwind_ForcedUnwind.
2 // { dg-do run { xfail "ia64-hp-hpux11.*" } }
4 // Test that forced unwinding does not call std::unexpected going
5 // throw a function with a non-empty exception spec.
10 static _Unwind_Reason_Code
11 force_unwind_stop (int version, _Unwind_Action actions,
12 _Unwind_Exception_Class exc_class,
13 struct _Unwind_Exception *exc_obj,
14 struct _Unwind_Context *context,
17 if (actions & _UA_END_OF_STACK)
19 return _URC_NO_REASON;
22 static void __attribute__((noreturn))
25 _Unwind_Exception *exc = new _Unwind_Exception;
26 exc->exception_class = 0;
27 exc->exception_cleanup = 0;
29 #ifndef __USING_SJLJ_EXCEPTIONS__
30 _Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
32 _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0);