blob: c9155ddaf40a783b20b457e9a1338eae5cca9c6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */
#include <math.h>
__attribute__ ((noinline))
float foo()
{
return sin(12.4f);
}
__attribute__ ((noinline))
float bar()
{
return sin(12.4f);
}
int main()
{
foo();
bar();
return 0;
}
/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */
/* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */
|