1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf"  } */
3 
4 struct A
5 {
6   int a, b, c;
7 };
8 
9 struct B
10 {
11   int x, y;
12 };
13 
14 __attribute__ ((noinline))
foo(struct A * a)15 int foo(struct A *a)
16 {
17   a->c = 1;
18 
19   return 123;
20 }
21 
22 __attribute__ ((noinline))
bar(struct B * b)23 int bar(struct B *b)
24 {
25   b->y = 1;
26 
27   return 123;
28 }
29 
main()30 int main()
31 {
32   return foo(0) + bar(0);
33 }
34 
35 /* { dg-final { scan-ipa-dump-not "Semantic equality hit:" "icf"  } } */
36 /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf"  } } */
37