summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr21030.c
blob: b7590c0edaa4731df405a680d0fb0fa315c8a9ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR tree-optimization/21030
   VRP used to create invalid ranges where VR->MIN is greater than
   VR->MAX.  */

void
foo (int unit)
{
  int i;

  for (i = 0; unit; i++, unit--)
    {
      if (i >= 0)
	{
	  int j = i;
	  while (j)
	    j--;
	}
    }
}