blob: 3903814aaaed8c296ad6384bf51504bbf4d37c71 [file] [log] [blame]
int a[32], b[32];
void
foo (void)
{
int i, j;
#pragma omp simd linear(i, j) collapse(2) // { dg-error "iteration variable 'i' should not be linear" }
for (i = 0; i < 32; ++i) // { dg-error "iteration variable 'j' should not be linear" "" { target *-*-* } .-1 }
for (j = 0; j < 32; ++j)
a[i] += b[j];
}
void
bar (void)
{
static int i, j;
#pragma omp for simd linear(i, j) collapse(2) // { dg-error "iteration variable 'i' should not be linear" "" { target *-*-* } .+1 }
for (i = 0; i < 32; ++i) // { dg-error "iteration variable 'j' should not be linear" }
for (j = 0; j < 32; ++j)
a[i] += b[j];
}