1  int a[32], b[32];
       2  
       3  void
       4  foo (void)
       5  {
       6    int i, j;
       7    #pragma omp simd linear(i, j) collapse(2)	/* { dg-error "iteration variable 'i' should not be linear" } */
       8    for (i = 0; i < 32; ++i)			/* { dg-error "iteration variable 'j' should not be linear" "" { target *-*-* } .-1 } */
       9      for (j = 0; j < 32; ++j)
      10        a[i] += b[j];
      11  }
      12  
      13  void
      14  bar (void)
      15  {
      16    static int i, j;
      17    #pragma omp for simd linear(i, j) collapse(2)	/* { dg-error "iteration variable 'i' should not be linear" } */
      18    for (i = 0; i < 32; ++i)			/* { dg-error "iteration variable 'j' should not be linear" "" { target *-*-* } .-1 } */
      19      for (j = 0; j < 32; ++j)
      20        a[i] += b[j];
      21  }