PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-icf-26.c
blob325ece1befa1e0355d093e38c68739777f11a708
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf" } */
4 void destroy (void)
8 void remove (void)
13 struct callbacks
15 void (*success) (void);
16 void (*error) (void);
19 struct callbacks my_callbacks;
21 __attribute__ ((noinline))
22 void foo()
24 my_callbacks.success = destroy;
27 __attribute__ ((noinline))
28 void bar()
30 my_callbacks.success = remove;
33 int main()
35 foo();
36 bar();
38 return 0;
41 /* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf" } } */
42 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */