summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxxabi/test/backtrace_test.pass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxxabi/test/backtrace_test.pass.cpp b/libcxxabi/test/backtrace_test.pass.cpp
index 9954e8b7afa..80346c0c948 100644
--- a/libcxxabi/test/backtrace_test.pass.cpp
+++ b/libcxxabi/test/backtrace_test.pass.cpp
@@ -21,6 +21,7 @@ trace_function(struct _Unwind_Context* context, void* ntraced) {
return _URC_NO_REASON;
}
+__attribute__ ((__noinline__))
void call3_throw(size_t* ntraced) {
try {
_Unwind_Backtrace(trace_function, ntraced);
@@ -29,10 +30,12 @@ void call3_throw(size_t* ntraced) {
}
}
+__attribute__ ((__noinline__, __disable_tail_calls__))
void call3_nothrow(size_t* ntraced) {
_Unwind_Backtrace(trace_function, ntraced);
}
+__attribute__ ((__noinline__, __disable_tail_calls__))
void call2(size_t* ntraced, bool do_throw) {
if (do_throw) {
call3_throw(ntraced);
@@ -41,6 +44,7 @@ void call2(size_t* ntraced, bool do_throw) {
}
}
+__attribute__ ((__noinline__, __disable_tail_calls__))
void call1(size_t* ntraced, bool do_throw) {
call2(ntraced, do_throw);
}
OpenPOWER on IntegriCloud