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