1/* { dg-do compile } */
2/* { dg-options "-O2 -Wuninitialized" } */
3
4typedef union tree_node *tree;
5
6struct tree_common
7{
8  tree chain;
9};
10
11struct tree_decl
12{
13  struct tree_common common;
14  tree name;
15};
16
17
18union tree_node
19{
20  struct tree_common common;
21  struct tree_decl decl;
22};
23
24int pedantic;
25
26void
27finish_struct (tree t, tree fieldlist, tree attributes)
28{
29  union tree_node * x;
30
31  if (pedantic)
32    {
33      x = fieldlist;
34      if (x->decl.name == 0)
35	{
36	  while (x)
37	    x = x->common.chain;
38	  foo (fieldlist);
39	}
40    }
41
42  x = fieldlist;
43  if (x)
44    {
45      do
46	{
47	  x = x->common.chain;
48	} while (x != 0);
49    }
50
51  bar1 (&fieldlist);
52}
53