aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/UnitTests/2008-07-13-InlineSetjmp.c
blob: f4aa890656f51d4f58f07854c11be959af8a8fe5 (plain)
1
2
3
4
5
6
7
8
9
// PR2486

#include <setjmp.h>      
#include <stdio.h>
jmp_buf g;
static int a() {longjmp(g,1);}
static void b(int* x) {if (setjmp(g))return;*x = 10;a();}
int main() {int a = 1; b(&a); printf("%d\n", a); return 0;}