blob: 7b5df4baaf4635bc330732e5ff016d46203cbeef (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* { dg-options "-O2 -fdump-ipa-icf" } */
/* { dg-do run } */
static int __attribute__((noinline))
foo(int i)
{
switch (i)
{
case 0:
case 1:
case 2:
case 3:
return 0;
default:
return 1;
}
}
static int __attribute__((noinline))
bar(int i)
{
switch (i)
{
case 4:
case 5:
case 6:
case 7:
return 0;
default:
return 1;
}
}
int main()
{
return foo(0) + bar(4);
}
/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */
/* { dg-final { cleanup-ipa-dump "icf" } } */
|