// expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
// expected-error@+2 2 {{expression is not an integral constant expression}}
// expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp target teams distribute simd collapse (argc
for(inti=ST;i<N;i++)
argv[0][i]=argv[0][i]-argv[0][i-ST];
// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target teams distribute simd collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for(inti=ST;i<N;i++)
argv[0][i]=argv[0][i]-argv[0][i-ST];
#pragma omp target teams distribute simd collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
for(inti=ST;i<N;i++)
argv[0][i]=argv[0][i]-argv[0][i-ST];
#pragma omp target teams distribute simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for(inti=ST;i<N;i++)
argv[0][i]=argv[0][i]-argv[0][i-ST];// expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute simd', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
// expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#pragma omp target teams distribute simd collapse (4 // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{as specified in 'collapse' clause}}
for(inti=4;i<12;i++)
argv[0][i]=argv[0][i]-argv[0][i-4];// expected-error {{expected 4 for loops after '#pragma omp target teams distribute simd', but found only 1}}
#pragma omp target teams distribute simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for(inti=4;i<12;i++)
argv[0][i]=argv[0][i]-argv[0][i-4];// expected-error {{expected 4 for loops after '#pragma omp target teams distribute simd', but found only 1}}
#if __cplusplus >= 201103L
// expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target teams distribute simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
for(inti=4;i<12;i++)
argv[0][i]=argv[0][i]-argv[0][i-4];
// expected-error@+6 {{expression is not an integral constant expression}}
// expected-error@+5 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
// expected-error@+4 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#if __cplusplus >= 201103L
// expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}