#pragma omp target parallel for private(a) private(this->a)
for(intk=0;k<v;++k)
++this->a;
}
S6&operator=(S6&s){
#pragma omp target parallel for private(a) private(this->a) private(s.a) // expected-error {{expected variable name or data member of current class}}
for(intk=0;k<s.a;++k)
++s.a;
return*this;
}
};
template<typenameT>
classS7:publicT{
Ta;
S7():a(0){}
public:
S7(Tv):a(v){
#pragma omp target parallel for private(a) private(this->a) private(T::a)
for(intk=0;k<a.a;++k)
++this->a.a;
}
S7&operator=(S7&s){
#pragma omp target parallel for private(a) private(this->a) private(s.a) private(s.T::a) // expected-error 2 {{expected variable name or data member of current class}}
for(intk=0;k<s.a.a;++k)
++s.a.a;
return*this;
}
};
S3h;
#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 parallel for private // expected-error {{expected '(' after 'private'}}
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for private() // expected-error {{expected expression}}
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target parallel for private(e, g) allocate(omp_thread_mem_alloc: e) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel for' directive}}
#pragma omp target parallel for private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for private(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}}
for(intk=0;k<argc;++k)
++k;
#pragma omp parallel
{
inti;
#pragma omp target parallel for private(i)
for(intk=0;k<argc;++k)
++k;
}
#pragma omp parallel shared(i)
#pragma omp parallel private(i)
#pragma omp target parallel for private(j)
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for private(i)
for(intk=0;k<argc;++k)
++k;
staticintm;
#pragma omp target parallel for private(m)
for(intk=0;k<argc;++k)
m=k+2;
s6=s6_0;// expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}}
s7=s7_0;// expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}}
returnfoomain(argc,argv);// expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}}