diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/run-make-fulldeps/longjmp-across-rust/foo.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/run-make-fulldeps/longjmp-across-rust/foo.c b/src/test/run-make-fulldeps/longjmp-across-rust/foo.c new file mode 100644 index 000000000..bd71cc4d7 --- /dev/null +++ b/src/test/run-make-fulldeps/longjmp-across-rust/foo.c @@ -0,0 +1,18 @@ +#include <assert.h> +#include <setjmp.h> + +static jmp_buf ENV; + +extern void test_middle(); + +void test_start(void(*f)()) { + if (setjmp(ENV) != 0) + return; + f(); + assert(0); +} + +void test_end() { + longjmp(ENV, 1); + assert(0); +} |