1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fstack-check=specific -fno-tree-dse -fno-tree-fre -fno-tree-loop-optimize -g" } */ 3 4 struct S 5 { 6 int w, z; 7 }; 8 struct T 9 { 10 struct S s; 11 }; 12 13 int i; 14 15 static inline struct S bar(struct S x)16bar (struct S x) 17 { 18 i++; 19 return x; 20 } 21 22 int foo(struct T t,struct S s)23foo (struct T t, struct S s) 24 { 25 struct S *c = &s; 26 if (i) 27 c = &t.s; 28 t.s.w = 3; 29 s = bar (*c); 30 return t.s.w; 31 } 32