Skip to content

Commit

Permalink
[OpenACC] Fix test that didn't actually test the clause it claimed to
Browse files Browse the repository at this point in the history
Apparently a copy/paste issue, we were testing private instead of
firstprivate for oen of the tests.
  • Loading branch information
erichkeane committed Nov 14, 2024
1 parent d84d0ca commit 4cdfa2a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions clang/test/SemaOpenACC/compute-construct-firstprivate-clause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,34 +60,34 @@ void uses(int IntParam, char *PointerParam, float ArrayParam[5], Complete Compos
template<typename T, unsigned I, typename V>
void TemplUses(T t, T (&arrayT)[I], V TemplComp) {
// expected-error@+1{{OpenACC variable is not a valid variable name, sub-array, array element, member of a composite variable, or composite variable member}}
#pragma acc parallel private(+t)
#pragma acc parallel firstprivate(+t)
while(true);

// NTTP's are only valid if it is a reference to something.
// expected-error@+2{{OpenACC variable is not a valid variable name, sub-array, array element, member of a composite variable, or composite variable member}}
// expected-note@#TEMPL_USES_INST{{in instantiation of}}
#pragma acc parallel private(I)
#pragma acc parallel firstprivate(I)
while(true);

// expected-error@+1{{OpenACC variable is not a valid variable name, sub-array, array element, member of a composite variable, or composite variable member}}
#pragma acc parallel private(t, I)
#pragma acc parallel firstprivate(t, I)
while(true);

#pragma acc parallel private(arrayT)
#pragma acc parallel firstprivate(arrayT)
while(true);

#pragma acc parallel private(TemplComp)
#pragma acc parallel firstprivate(TemplComp)
while(true);

#pragma acc parallel private(TemplComp.PointerMember[5])
#pragma acc parallel firstprivate(TemplComp.PointerMember[5])
while(true);
int *Pointer;
#pragma acc parallel private(Pointer[:I])
#pragma acc parallel firstprivate(Pointer[:I])
while(true);
#pragma acc parallel private(Pointer[:t])
#pragma acc parallel firstprivate(Pointer[:t])
while(true);
// expected-error@+1{{OpenACC sub-array length is unspecified and cannot be inferred because the subscripted value is not an array}}
#pragma acc parallel private(Pointer[1:])
#pragma acc parallel firstprivate(Pointer[1:])
while(true);
}

Expand All @@ -96,10 +96,10 @@ void NTTP() {
// NTTP's are only valid if it is a reference to something.
// expected-error@+2{{OpenACC variable is not a valid variable name, sub-array, array element, member of a composite variable, or composite variable member}}
// expected-note@#NTTP_INST{{in instantiation of}}
#pragma acc parallel private(I)
#pragma acc parallel firstprivate(I)
while(true);

#pragma acc parallel private(NTTP_REF)
#pragma acc parallel firstprivate(NTTP_REF)
while(true);
}

Expand Down

0 comments on commit 4cdfa2a

Please sign in to comment.