LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / switch-case-2.c
blob9b0dfc2dbb502373e4cc212b7ce9608ef2eef329
1 /* { dg-options "-O2 -fdump-ipa-profile-all" } */
2 int g;
4 __attribute__((noinline)) void foo (int n)
6 switch (n)
8 case 99:
9 g += 2; break;
10 case 1:
11 g++; break;
12 case 100:
13 g += 1; break;
14 case 4:
15 g += 3; break;
16 case 5:
17 g += 4; break;
18 case 6:
19 g += 5; break;
20 case 7:
21 g += 6; break;
22 case 8:
23 g += 7; break;
24 case 9:
25 g += 8; break;
26 default:
27 g += 8; break;
31 int main ()
33 int i;
34 for (i = 0; i < 10000; i++)
35 foo ((i * i) % 5);
36 return 0;
38 /* autofdo cannot do that precise execution numbers: */
39 /* { dg-final-use-not-autofdo { scan-ipa-dump-times ";; basic block\[^\\n\]*count 4000" 2 "profile"} } */
40 /* { dg-final-use-not-autofdo { scan-ipa-dump-times ";; basic block\[^\\n\]*count 2000" 1 "profile"} } */