3 // Test that forced unwinding does not call std::unexpected going
4 // throw a function with a non-empty exception spec.
9 static _Unwind_Reason_Code
10 force_unwind_stop (int version, _Unwind_Action actions,
11 _Unwind_Exception_Class exc_class,
12 struct _Unwind_Exception *exc_obj,
13 struct _Unwind_Context *context,
16 if (actions & _UA_END_OF_STACK)
18 return _URC_NO_REASON;
21 static void __attribute__((noreturn))
24 _Unwind_Exception *exc = new _Unwind_Exception;
25 exc->exception_class = 0;
26 exc->exception_cleanup = 0;
28 #ifndef __USING_SJLJ_EXCEPTIONS__
29 _Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
31 _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0);