#pragma omp target parallel for firstprivate(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 firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
for(intk=0;k<argc;++k)
++k;
#pragma omp parallel
{
intv=0;
inti;
#pragma omp target parallel for firstprivate(i)
for(intk=0;k<argc;++k){
i=k;
v+=i;
}
}
#pragma omp parallel shared(i)
#pragma omp parallel private(i)
#pragma omp target parallel for firstprivate(j)
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for firstprivate(i)
for(intk=0;k<argc;++k)
++k;
#pragma omp target parallel for lastprivate(g) firstprivate(g) // expected-error {{calling a private constructor of class 'S5'}}
for(i=0;i<argc;++i)
foo();
#pragma omp parallel private(i)
#pragma omp target parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
for(i=0;i<argc;++i)// expected-error {{loop iteration variable in the associated loop of 'omp target parallel for' directive may not be firstprivate, predetermined as private}}
foo();
#pragma omp parallel reduction(+ : i)
#pragma omp target parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
for(i=0;i<argc;++i)// expected-error {{loop iteration variable in the associated loop of 'omp target parallel for' directive may not be firstprivate, predetermined as private}}
foo();
return0;
}
namespaceA{
doublex;
#pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}}
}
namespaceB{
usingA::x;
}
intmain(intargc,char**argv){
constintd=5;
constintda[5]={0};
S4e(4);
S5g(5);
S3m;
S6n(2);
inti;
int&j=i;
#pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate() // expected-error {{expected expression}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target parallel for firstprivate(ba) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(ca) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(da) // OK
for(i=0;i<argc;++i)
foo();
intxa;
#pragma omp target parallel for firstprivate(xa) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(S2::S2s) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(S2::S2sc) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp target parallel for'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(m) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
for(i=0;i<argc;++i)// expected-error {{loop iteration variable in the associated loop of 'omp target parallel for' directive may not be firstprivate, predetermined as private}}
foo();
#pragma omp parallel shared(xa)
#pragma omp target parallel for firstprivate(xa) // OK: may be firstprivate
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(j)
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(g) firstprivate(g) // expected-error {{calling a private constructor of class 'S5'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(n) firstprivate(n) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp parallel
{
intv=0;
inti;
#pragma omp target parallel for firstprivate(i)
for(intk=0;k<argc;++k){
i=k;
v+=i;
}
}
#pragma omp parallel private(i)
#pragma omp target parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
for(i=0;i<argc;++i)// expected-error {{loop iteration variable in the associated loop of 'omp target parallel for' directive may not be firstprivate, predetermined as private}}
foo();
#pragma omp parallel reduction(+ : i)
#pragma omp target parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
for(i=0;i<argc;++i)// expected-error {{loop iteration variable in the associated loop of 'omp target parallel for' directive may not be firstprivate, predetermined as private}}
foo();
staticintsi;
#pragma omp target parallel for firstprivate(si) // OK
for(i=0;i<argc;++i)
si=i+1;
returnfoomain<S4,S5>(argc,argv);// expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}