Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / attr-hotcold-2.c
blob17526113d4b65b1a3d87a2ebab1b476ed64179fa
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-profile_estimate" } */
4 int v1, v2;
5 void f(int x, int y)
7 if (x) goto A;
8 if (y) goto B;
9 return;
11 A: __attribute__((cold))
12 v1 = x;
13 return;
15 B: __attribute__((hot))
16 v2 = y;
17 return;
20 /* { dg-final { scan-tree-dump-times "hot label heuristics" 1 "profile_estimate" } } */
21 /* { dg-final { scan-tree-dump-times "cold label heuristics" 1 "profile_estimate" } } */
22 /* { dg-final { scan-tree-dump-times "combined heuristics: 0\\\..*" 1 "profile_estimate" } } */
24 /* Note: we're attempting to match some number > 6000, i.e. > 60%.
25 The exact number ought to be tweekable without having to juggle
26 the testcase around too much. */
27 /* { dg-final { scan-tree-dump-times "combined heuristics: \[6-9\]\[0-9\]\\\..*" 1 "profile_estimate" } } */