summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/loop-39.c
blob: 53680dd2349fa0e33a3f68d1611669ee64b52333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-sccp-details" } */

int
foo (unsigned int n)
{
  int i, r = 1;
  if (n > 0)
    {
      asm ("");
      if (n < 10)
	{
	  asm ("");
	  do
	    {
	      --n;
	      r *= 2;
	    }
	  while (n > 0);
	}
    }
  return r + n;
}

/* { dg-final { scan-tree-dump "# of iterations \[^\n\r]*, bounded by 8" "sccp" } } */