diff options
Diffstat (limited to 'test/lld/longjmp.c')
-rw-r--r-- | test/lld/longjmp.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lld/longjmp.c b/test/lld/longjmp.c new file mode 100644 index 000000000..1df54f6f2 --- /dev/null +++ b/test/lld/longjmp.c @@ -0,0 +1,17 @@ +typedef struct jmp_buf_buf { + int thing; +} jmp_buf; + +void longjmp(jmp_buf env, int val); +int setjmp(jmp_buf env); + +int __THREW__; +int __threwValue; + +int main() { + jmp_buf jmp; + if (setjmp(jmp) == 0) { + longjmp(jmp, 1); + } + return 0; +} |