PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-icf-29.c
blob870035c1a9b22457c31a688465aa9207f2622837
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->b;
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: 0" "icf" } } */