PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-icf-30.c
blob043522d3af0f704b4f3fc4333c1bf391d2f051c4
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf -fno-inline" } */
4 struct str
6 unsigned a:1, b:1;
7 };
9 static struct str test;
11 unsigned foo(struct str *s)
13 return s->a;
16 unsigned bar(struct str *s)
18 return s->a;
21 int main()
23 test.a = 0;
24 test.b = 1;
26 return foo (&test) == bar (&test);
29 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */