PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / pr63747.c
blob3e9fac7ee30209b6710bd9baa355c32df64892ba
1 /* { dg-options "-O2 -fdump-ipa-icf" } */
2 /* { dg-do run } */
4 static int __attribute__((noinline))
5 foo(int i)
7 switch (i)
9 case 0:
10 case 1:
11 case 2:
12 case 3:
13 return 0;
14 default:
15 return 1;
19 static int __attribute__((noinline))
20 bar(int i)
22 switch (i)
24 case 4:
25 case 5:
26 case 6:
27 case 7:
28 return 0;
29 default:
30 return 1;
34 int main()
36 return foo(0) + bar(4);
39 /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */