1 /* { dg-do compile } */ 2 /* { dg-require-alias "" } */ 3 /* { dg-options "-O0 -fipa-icf -fdump-ipa-icf" } */ 4 do_work(void)5static int do_work(void) 6 { 7 return 0; 8 } 9 10 static int foo() __attribute__((alias("do_work"))); 11 static int bar() __attribute__((alias("do_work"))); 12 a()13static int a() 14 { 15 return foo(); 16 } 17 b()18static int b() 19 { 20 return bar(); 21 } 22 main()23int main() 24 { 25 return a() + b(); 26 } 27 28 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ 29