summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/loop-2.c
blob: 3227734fbf8bc1454d6b75cdc0ec5adcf32d9e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int a[2];

f (b)
{
  unsigned int i;
  for (i = 0; i < b; i++)
    a[i] = i - 2;
}

main ()
{
  a[0] = a[1] = 0;
  f (2);
  if (a[0] != -2 || a[1] != -1)
    abort ();
  exit (0);
}