aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr101145-1.c
blob: e6f7923d78ac703012f810e5e7700d219731867f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

unsigned foo(unsigned val, unsigned start)
{
  unsigned cnt = 0;
  for (unsigned i = start; i > val; ++i)
    cnt++;
  return cnt;
}

/* { dg-final { scan-tree-dump "cnt_\[0-9\] = -start_\[0-9\]\\(D\\);" "optimized" } } */