summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr42719.c
blob: 94a58e41a1aebe4ad7715664078bfcaa05165443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR tree-optimization/42719 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftracer -fcompare-debug" } */

int *v;

void
foo (int a)
{
  int i, j;
  for (j = i = a; i != -1; j = i, i = v[i])
    ;
  v[j] = v[a];
}