#pragma omp target teams is_device_ptr // expected-error {{expected '(' after 'is_device_ptr'}}
{}
#pragma omp target teams is_device_ptr( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}
{}
#pragma omp target teams is_device_ptr() // expected-error {{expected expression}}
{}
#pragma omp target teams is_device_ptr(alloc) // expected-error {{use of undeclared identifier 'alloc'}}
{}
#pragma omp target teams is_device_ptr(arg // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(i) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(j) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(k) // OK
{}
#pragma omp target teams is_device_ptr(z) // OK
{}
#pragma omp target teams is_device_ptr(aa) // OK
{}
#pragma omp target teams is_device_ptr(raa) // OK
{}
#pragma omp target teams is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(g) // OK
{}
#pragma omp target teams is_device_ptr(rg) // OK
{}
#pragma omp target teams is_device_ptr(k,i,j) // expected-error2 {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(d) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(da) // OK
{}
return;
}
};
structSB{
unsignedA;
unsignedB;
floatArr[100];
float*Ptr;
float*foo(){
return&Arr[0];
}
};
structSC{
unsignedA:2;
unsignedB:3;
unsignedC;
unsignedD;
floatArr[100];
SBS;
SBArrS[100];
SB*PtrS;
SB*&RPtrS;
float*Ptr;
SC(SB*&_RPtrS):RPtrS(_RPtrS){}
};
unionSD{
unsignedA;
floatB;
};
structS1;
externS1a;
classS2{
mutableinta;
public:
S2():a(0){}
S2(S2&s2):a(s2.a){}
staticfloatS2s;
staticconstfloatS2sc;
};
constfloatS2::S2sc=0;
constS2b;
constS2ba[5];
classS3{
inta;
public:
S3():a(0){}
S3(S3&s3):a(s3.a){}
};
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){}
};
S3h;
#pragma omp threadprivate(h)
typedefstruct{
inta;
}S6;
template<typenameT,intI>
Ttmain(Targc){
constTd=5;
constTda[5]={0};
S4e(4);
S5g(5);
S6h[10];
auto&rh=h;
Ti;
T&j=i;
T*k=&j;
T*&z=k;
Taa[10];
auto&raa=aa;
S6*ps;
#pragma omp target teams is_device_ptr // expected-error {{expected '(' after 'is_device_ptr'}}
{}
#pragma omp target teams is_device_ptr( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}
{}
#pragma omp target teams is_device_ptr() // expected-error {{expected expression}}
{}
#pragma omp target teams is_device_ptr(alloc) // expected-error {{use of undeclared identifier 'alloc'}}
{}
#pragma omp target teams is_device_ptr(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(i) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(j) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(k) // OK
{}
#pragma omp target teams is_device_ptr(z) // OK
{}
#pragma omp target teams is_device_ptr(aa) // OK
{}
#pragma omp target teams is_device_ptr(raa) // OK
{}
#pragma omp target teams is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(g) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(h) // OK
{}
#pragma omp target teams is_device_ptr(rh) // OK
{}
#pragma omp target teams is_device_ptr(k,i,j) // expected-error2 {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(d) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(da) // OK
{}
#pragma omp target teams map(ps) is_device_ptr(ps) // expected-error{{variable already marked as mapped in current construct}} expected-note{{used here}}
{}
#pragma omp target teams is_device_ptr(ps) map(ps) // expected-error{{variable already marked as mapped in current construct}} expected-note{{used here}}
{}
#pragma omp target teams map(ps->a) is_device_ptr(ps) // expected-error{{variable already marked as mapped in current construct}} expected-note{{used here}}
{}
#pragma omp target teams is_device_ptr(ps) map(ps->a) // expected-error{{pointer cannot be mapped along with a section derived from itself}} expected-note{{used here}}
#pragma omp target teams is_device_ptr(ps) firstprivate(ps) // omp4-error{{firstprivate variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}}
#pragma omp target teams firstprivate(ps) is_device_ptr(ps) // expected-error{{firstprivate variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}} expected-note{{defined as firstprivate}}
#pragma omp target teams is_device_ptr(ps) private(ps) // omp4-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}}
#pragma omp target teams private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}} expected-note{{defined as private}}
{}
return0;
}
intmain(intargc,char**argv){
constintd=5;
constintda[5]={0};
S4e(4);
S5g(5);
S6h[10];
auto&rh=h;
inti;
int&j=i;
int*k=&j;
int*&z=k;
intaa[10];
auto&raa=aa;
S6*ps;
#pragma omp target teams is_device_ptr // expected-error {{expected '(' after 'is_device_ptr'}}
{}
#pragma omp target teams is_device_ptr( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}
{}
#pragma omp target teams is_device_ptr() // expected-error {{expected expression}}
{}
#pragma omp target teams is_device_ptr(alloc) // expected-error {{use of undeclared identifier 'alloc'}}
{}
#pragma omp target teams is_device_ptr(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(i) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(j) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(k) // OK
{}
#pragma omp target teams is_device_ptr(z) // OK
{}
#pragma omp target teams is_device_ptr(aa) // OK
{}
#pragma omp target teams is_device_ptr(raa) // OK
{}
#pragma omp target teams is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(g) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(h) // OK
{}
#pragma omp target teams is_device_ptr(rh) // OK
{}
#pragma omp target teams is_device_ptr(k,i,j) // expected-error2 {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(d) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
{}
#pragma omp target teams is_device_ptr(da) // OK
{}
#pragma omp target teams map(ps) is_device_ptr(ps) // expected-error{{variable already marked as mapped in current construct}} expected-note{{used here}}
{}
#pragma omp target teams is_device_ptr(ps) map(ps) // expected-error{{variable already marked as mapped in current construct}} expected-note{{used here}}
{}
#pragma omp target teams map(ps->a) is_device_ptr(ps) // expected-error{{variable already marked as mapped in current construct}} expected-note{{used here}}
{}
#pragma omp target teams is_device_ptr(ps) map(ps->a) // expected-error{{pointer cannot be mapped along with a section derived from itself}} expected-note{{used here}}
#pragma omp target teams is_device_ptr(ps) firstprivate(ps) // omp4-error{{firstprivate variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}}
#pragma omp target teams firstprivate(ps) is_device_ptr(ps) // expected-error{{firstprivate variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}} expected-note{{defined as firstprivate}}
#pragma omp target teams is_device_ptr(ps) private(ps) // omp4-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}}
#pragma omp target teams private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target teams' directive}} expected-note{{defined as private}}
{}
returntmain<int,3>(argc);// expected-note {{in instantiation of function template specialization 'tmain<int, 3>' requested here}}