// omp4-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}}
// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}}
// omp4-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}}
// omp4-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}}
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;++jj)
c[ii]=a[jj];
#pragma omp target
#pragma omp teams distribute simd
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;++++ii)
c[ii]=a[ii];
// Ok but undefined behavior (in general, cannot check that incr
// is really loop-invariant).
#pragma omp target
#pragma omp teams distribute simd
for(ii=0;ii<10;ii=ii+ii)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-error@+1 {{expression must have integral or unscoped enumeration type, not 'float'}}
for(ii=0;ii<10;ii=ii+1.0f)
c[ii]=a[ii];
// Ok - step was converted to integer type.
#pragma omp target
#pragma omp teams distribute simd
for(ii=0;ii<10;ii=ii+(int)1.1f)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;jj=ii+2)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-warning@+2 {{relational comparison result unused}}
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;jj>kk+2)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-warning@+2 {{expression result unused}}
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;!ii)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;ii?++ii:++jj)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-error@+1 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
for(ii=0;ii<10;ii=ii<10)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be positive due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
for(ii=0;ii<10;ii=ii+0)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be positive due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
for(ii=0;ii<10;ii=ii+(int)(0.8-0.45))
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be positive due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
for(ii=0;(ii)<10;ii-=25)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be positive due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
for(ii=0;(ii<10);ii-=0)
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be negative due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
for(ii=0;ii>10;(ii+=0))
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be positive due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
for(ii=0;ii<10;(ii)=(1-1)+(ii))
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be negative due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
for((ii=0);ii>10;(ii-=0))
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd
// expected-note@+2 {{loop step is expected to be positive due to this condition}}
// expected-error@+1 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
for(ii=0;(ii<10);(ii-=0))
c[ii]=a[ii];
#pragma omp target
#pragma omp teams distribute simd firstprivate(ii) // expected-note {{defined as firstprivate}}
// expected-error@+1 {{loop iteration variable in the associated loop of 'omp teams distribute simd' directive may not be firstprivate, predetermined as linear}}
#pragma omp teams distribute simd private(ii) // omp4-note {{defined as private}}
// omp4-error@+1 {{loop iteration variable in the associated loop of 'omp teams distribute simd' directive may not be private, predetermined as linear}}
#pragma omp teams distribute simd lastprivate(ii) // omp4-note {{defined as lastprivate}}
// omp4-error@+1 {{loop iteration variable in the associated loop of 'omp teams distribute simd' directive may not be lastprivate, predetermined as linear}}
// expected-error@+1 {{loop iteration variable in the associated loop of 'omp teams distribute simd' directive may not be threadprivate or thread local, predetermined as linear}}
// omp4-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} omp5-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'I'}}
// omp4-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} omp5-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'I'}}
// omp4-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} omp5-error@+1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'I'}}
for(ITI=begin;I<end;I+=TC<int,ST>::step()){// expected-warning 2 {{Type 'GoodIter' is not trivially copyable and not guaranteed to be mapped correctly}}
#pragma omp teams distribute simd lastprivate(s) firstprivate(s) // expected-error {{calling a private constructor of class 'S'}} expected-warning {{Type 'S' is not trivially copyable and not guaranteed to be mapped correctly}}
#pragma omp teams distribute simd ordered // expected-error {{unexpected OpenMP clause 'ordered' in directive '#pragma omp teams distribute simd'}}
for(inti=0;i<16;++i)
;
}
voidtest_nowait(){
#pragma omp target
// expected-error@+1 2 {{unexpected OpenMP clause 'nowait' in directive '#pragma omp teams distribute simd'}}
#pragma omp teams distribute simd nowait nowait // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'nowait' clause}}