1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* { dg-do compile } */ /* { dg-options "-O2 -g -fno-dce -fno-tree-dce" } */ extern void *buf; extern void bar (void); int foo (int i) { int j = 0; if (__builtin_setjmp (buf) == 0) { while (1) { j = 1; bar (); } } return j ? i : 0; }