2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr57287-2.c
blob1ddf76c646169fa913faa6708141fc08588b007e
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
4 #include <setjmp.h>
6 struct node
8 struct node *next;
9 char *name;
10 } *list;
12 struct node *list;
13 struct node *head (void);
15 jmp_buf *bar (void);
17 int baz (void)
19 struct node *n;
20 int varseen = 0;
22 list = head ();
23 for (n = list; n; n = n->next)
25 if (!varseen)
26 varseen = 1;
28 jmp_buf *buf = bar (); /* { dg-bogus "may be used uninitialized" "" } */
29 setjmp (*buf);
32 if (!varseen)
33 return 0;
34 return 1;