#pragma omp target parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
intxa;
#pragma omp target parallel for lastprivate(xa) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
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 lastprivate(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 lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(i)
for(i=0;i<argc;++i)
foo();
#pragma omp parallel private(xa)
#pragma omp target parallel for lastprivate(xa)
for(i=0;i<argc;++i)
foo();
#pragma omp parallel reduction(+ : xa)
#pragma omp target parallel for lastprivate(xa)
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(j)
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for firstprivate(m) lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target parallel for lastprivate(n) firstprivate(n) // OK
for(i=0;i<argc;++i)
foo();
staticintsi;
#pragma omp target parallel for lastprivate(si) // OK
for(i=0;i<argc;++i)
si=i+2;
returnfoomain<S4,S5>(argc,argv);// expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}