summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted/mregtst.c
blob: b6bb6c21f55e9a89e2a759597de112d59aeec958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
foo (a, p)
     int *p;
{
  int old, new, i;

  old = 0;
  for (i = 1; i < 100; i++)
    {
      new = p[i];
      if (new < old)
	a++;
      old = new;
      if (old == 0)
	return 0;
    }
  return a;
}