#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
template<classI,classC>intfoomain(Iargc,C**argv){
Ie(4);
Ig(5);
inti;
int&j=i;
#pragma omp target teams distribute simd linear // expected-error {{expected '(' after 'linear'}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear () // expected-error {{expected expression}}
#pragma omp target teams distribute simd linear (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
#pragma omp target teams distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
#pragma omp target teams distribute simd linear(i)
for(intk=0;k<argc;++k)++k;
return0;
}
namespaceA{
doublex;
#pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}}
}
namespaceC{
usingA::x;
}
intmain(intargc,char**argv){
doubledarr[100];
// expected-note@+1 {{in instantiation of function template specialization 'test_template<-4, double, int>' requested here}}
test_template<-4>(darr,4);
// expected-note@+1 {{in instantiation of function template specialization 'test_warn<0>' requested here}}
test_warn<0>();
S4e(4);// expected-note {{'e' defined here}}
S5g(5);// expected-note {{'g' defined here}}
inti;
int&j=i;
#pragma omp target teams distribute simd linear // expected-error {{expected '(' after 'linear'}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear () // expected-error {{expected expression}}
#pragma omp target teams distribute simd linear (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
#pragma omp target teams distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
#pragma omp target teams distribute simd linear (argv[1]) // expected-error {{expected variable name}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear(e, g) // expected-error {{argument of a linear clause should be of integral or pointer type, not 'S4'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S5'}}
for(intk=0;k<argc;++k)++k;
#pragma omp target teams distribute simd linear(h, C::x) // expected-error 2 {{threadprivate or thread local variable cannot be linear}}
for(intk=0;k<argc;++k)++k;
foomain<int,char>(argc,argv);// expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}}