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