PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-icf-23.c
blob02bb138c28d369517713f354924243c7d48d75be
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf" } */
4 struct A
6 int a;
7 int b;
8 };
10 __attribute__ ((noinline))
11 int foo(struct A *a)
13 return 123;
16 __attribute__ ((noinline))
17 int bar(struct A *b)
19 return 123;
22 int main()
24 return foo(0) + bar(0);
27 /* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */
28 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */