1extern int strcmp(const char *, const char *);
2extern char *strcpy(char *, const char *);
3extern void abort(void);
4extern void exit(int);
5
6void *buf[20];
7
8void __attribute__((noinline))
9sub2 (void)
10{
11  __builtin_longjmp (buf, 1);
12}
13
14int
15main ()
16{
17  char *p = (char *) __builtin_alloca (20);
18
19  strcpy (p, "test");
20
21  if (__builtin_setjmp (buf))
22    {
23      if (strcmp (p, "test") != 0)
24	abort ();
25
26      exit (0);
27    }
28
29  {
30    int *q = (int *) __builtin_alloca (p[2] * sizeof (int));
31    int i;
32
33    for (i = 0; i < p[2]; i++)
34      q[i] = 0;
35
36    while (1)
37      sub2 ();
38  }
39}
40