summaryrefslogtreecommitdiff
path: root/lib/libc_r/TEST/test_setjmp.c
blob: 31610fd83877868e87f092ff23528907515aeb70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <setjmp.h>
#include "test.h"

int reached;

main()
{
	jmp_buf foo;

	reached = 0;
	if (setjmp(foo)) {
		ASSERT(reached);
		SUCCEED;
	}
	reached = 1;
	longjmp(foo, 1);
	PANIC("longjmp");
}