2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr57287-2.c
blobb41ae64f933259b7bb72ba4feab935d99d566790
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
3 /* { dg-require-effective-target indirect_jumps } */
5 #include <setjmp.h>
7 struct node
9 struct node *next;
10 char *name;
11 } *list;
13 struct node *list;
14 struct node *head (void);
16 jmp_buf *bar (void);
18 int baz (void)
20 struct node *n;
21 int varseen = 0;
23 list = head ();
24 for (n = list; n; n = n->next)
26 if (!varseen)
27 varseen = 1;
29 jmp_buf *buf = bar (); /* { dg-bogus "may be used uninitialized" } */
30 setjmp (*buf);
33 if (!varseen)
34 return 0;
35 return 1;