blob: 5a3cca24fa27ca3505f0ee993ce8465a684f6315 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */
__attribute__ ((noinline))
int zero()
{
return 0;
}
__attribute__ ((noinline))
int nula()
{
return 0;
}
__attribute__ ((noinline))
int foo()
{
return zero();
}
__attribute__ ((noinline))
int bar()
{
return nula();
}
int main()
{
return foo() + bar();
}
/* { dg-final { scan-ipa-dump "Semantic equality hit:.*bar.*->.*foo.*" "icf" } } */
/* { dg-final { scan-ipa-dump "Semantic equality hit:.*nula.*->.*zero.*" "icf" } } */
/* { dg-final { scan-ipa-dump "Equal symbols: 2" "icf" } } */