#pragma omp distribute parallel for lastprivate(ba)
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
intxa;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(xa) // OK
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp distribute parallel for'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute 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
#pragma omp teams
#pragma omp distribute parallel for lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(B::x) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute 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
#pragma omp teams
#pragma omp distribute parallel for lastprivate(i)
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(xa)
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(xa)
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(j)
for(i=0;i<argc;++i)
foo();
#pragma omp target
#pragma omp teams
#pragma omp distribute 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
#pragma omp teams
#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // OK
for(i=0;i<argc;++i)
foo();
staticintsi;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for lastprivate(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}}