structS1;// expected-note {{declared here}} expected-note{{forward declaration of 'S1'}}
externS1a;
classS2{
mutableinta;
public:
S2():a(0){}
S2(constS2&s2):a(s2.a){}
staticfloatS2s;
staticconstfloatS2sc;
};
constfloatS2::S2sc=0;
constS2b;
constS2ba[5];
classS3{
inta;
S3&operator=(constS3&s3);
public:
S3():a(0){}// expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}} expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
S3(S3&s3):a(s3.a){}// expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}} expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}}
};
constS3c;
constS3ca[5];
externconstintf;
classS4{
inta;
S4();
S4(constS4&s4);
public:
S4(intv):a(v){}
};
classS5{
inta;
S5():a(0){}
S5(constS5&s5):a(s5.a){}
public:
S5(intv):a(v){}
};
classS6{
inta;
public:
S6():a(0){}
};
S3h;
#pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}}
intmain(intargc,char**argv){
constintd=5;
constintda[5]={0};
S4e(4);
S5g(5);
S6p;
inti;
int&j=i;
#pragma omp target teams distribute simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd firstprivate ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target teams distribute simd firstprivate(ba)
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd firstprivate(da)
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd firstprivate(S2::S2s)
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd firstprivate(S2::S2sc)
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
for(i=0;i<argc;++i)foo();
#pragma omp target teams distribute simd private(i), firstprivate(i) // expected-error {{private variable cannot be firstprivate}} expected-note 2 {{defined as private}}
for(i=0;i<argc;++i)foo();// expected-error {{loop iteration variable in the associated loop of 'omp target teams distribute simd' directive may not be private, predetermined as linear}}
#pragma omp target teams distribute simd firstprivate(i)
for(j=0;j<argc;++j)foo();
#pragma omp target teams distribute simd firstprivate(i) // expected-note {{defined as firstprivate}}
for(i=0;i<argc;++i)foo();// expected-error {{loop iteration variable in the associated loop of 'omp target teams distribute simd' directive may not be firstprivate, predetermined as linear}}
#pragma omp target teams distribute simd firstprivate(j)
#pragma omp target teams distribute simd firstprivate(argc) map(argc) // expected-error {{firstprivate variable cannot be in a map clause in '#pragma omp target teams distribute simd' directive}} expected-note {{defined as firstprivate}}