comparison gcc/testsuite/gcc.dg/pr57287-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
3 /* { dg-require-effective-target indirect_jumps } */
4
5 #include <setjmp.h>
6
7 struct node
8 {
9 struct node *next;
10 char *name;
11 } *list;
12
13 struct node *list;
14 struct node *head (void);
15
16 jmp_buf *bar (void);
17
18 int baz (void)
19 {
20 struct node *n;
21 int varseen = 0;
22
23 list = head ();
24 for (n = list; n; n = n->next)
25 {
26 if (!varseen)
27 varseen = 1;
28
29 jmp_buf *buf = bar (); /* { dg-bogus "may be used uninitialized" } */
30 setjmp (*buf);
31 }
32
33 if (!varseen)
34 return 0;
35 return 1;
36 }