aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/predict-loop-exit-3.C
blob: 9afc78ef91aaa7db1b868c498aaf35d431db7217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */

int g;
int foo();
void test() {
  while (foo() && (g < 10 || g > 20))
    g++;
  return;
}

/* { dg-final { scan-tree-dump-times "loop exit heuristics:" 3 "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */