1 // { dg-do compile }
2 // { dg-additional-options "-fcompare-debug" }
3 
4 extern void fancy_abort () __attribute__ ((__noreturn__));
5 extern "C" {
6     struct __jmp_buf_tag { };
7     typedef struct __jmp_buf_tag jmp_buf[1];
8     extern int _setjmp (struct __jmp_buf_tag __env[1]) throw ();
9 }
10 extern void *gfc_state_stack;
11 static jmp_buf eof_buf;
push_state()12 static void push_state ()
13 {
14   if (!gfc_state_stack)
15     fancy_abort ();
16 }
gfc_parse_file(void)17 bool gfc_parse_file (void)
18 {
19   int seen_program=0;
20   if (_setjmp (eof_buf))
21     return false;
22   if (seen_program)
23     goto duplicate_main;
24   seen_program = 1;
25   push_state ();
26   push_state ();
27 duplicate_main:
28   return true;
29 }
30