1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-fre1-details" } */
       3  
       4  int x[1024];
       5  int foo (int a, int s, unsigned int k)
       6  {
       7    int i = a, j = a;
       8    int sum = 0;
       9    do
      10      {
      11        sum += x[i];
      12        sum += x[j];
      13        i += s;
      14        j += s;
      15      }
      16    while (k--);
      17    return sum;
      18  }
      19  
      20  /* We want to remove the redundant induction variable and thus its PHI node.  */
      21  /* { dg-final { scan-tree-dump "Removing dead stmt \[^\r\n\]*PHI" "fre1" } } */