#undef NDEBUG
#include <assert.h>
#include <libunwind.h>
#ifdef __riscv_vector
__attribute__((noinline)) extern "C" void stepper() {
unw_cursor_t cursor;
unw_context_t uc;
unw_getcontext(&uc);
unw_init_local(&cursor, &uc);
assert(unw_step(&cursor) > 0);
assert(unw_step(&cursor) > 0);
}
__attribute__((noinline)) static void foo() {
__rvv_int32m1_t v;
asm volatile("" : "=vr"(v)); stepper(); asm volatile("" ::"vr"(v)); }
int main(int, char **) {
foo();
return 0;
}
#else
int main(int, char **) { return 0; }
#endif