Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr108117.c
blob4b3bebe229e579ad2c369f8d518af027dcfe1d38
1 /* { dg-do run } */
2 /* { dg-require-effective-target nonlocal_goto } */
3 /* { dg-require-effective-target scheduling } */
4 /* { dg-options "-O2 -fschedule-insns" } */
6 #include <stdio.h>
7 #include <setjmp.h>
9 jmp_buf ex_buf;
11 __attribute__((noipa))
12 void fn_throw(int x)
14 if (x)
15 longjmp(ex_buf, 1);
18 int main(void)
20 int vb = 0; // NB: not volatile, not modified after setjmp
22 if (!setjmp(ex_buf)) {
23 fn_throw(1);
24 vb = 1; // not reached in the abstract machine
27 if (vb) {
28 printf("Failed, vb = %d!\n", vb);
29 return 1;