PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr48134.c
blob446ad01b45271a071167d66f84955278b7977bec
1 /* { dg-do compile } */
2 /* { dg-require-stack-check "specific" } */
3 /* { dg-options "-O2 -fstack-check=specific -fno-tree-dse -fno-tree-fre -fno-tree-loop-optimize -g" } */
5 struct S
7 int w, z;
8 };
9 struct T
11 struct S s;
14 int i;
16 static inline struct S
17 bar (struct S x)
19 i++;
20 return x;
23 int
24 foo (struct T t, struct S s)
26 struct S *c = &s;
27 if (i)
28 c = &t.s;
29 t.s.w = 3;
30 s = bar (*c);
31 return t.s.w;