Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c

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