[clang] 4cdfa2a - [OpenACC] Fix test that didn't actually test the clause it claimed to
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 07:18:44 PST 2024
Author: erichkeane
Date: 2024-11-14T07:18:38-08:00
New Revision: 4cdfa2a2c80d59db10d1a17e4ff0ec9902952759
URL: https://github.com/llvm/llvm-project/commit/4cdfa2a2c80d59db10d1a17e4ff0ec9902952759
DIFF: https://github.com/llvm/llvm-project/commit/4cdfa2a2c80d59db10d1a17e4ff0ec9902952759.diff
LOG: [OpenACC] Fix test that didn't actually test the clause it claimed to
Apparently a copy/paste issue, we were testing private instead of
firstprivate for oen of the tests.
Added:
Modified:
clang/test/SemaOpenACC/compute-construct-firstprivate-clause.cpp
Removed:
################################################################################
diff --git a/clang/test/SemaOpenACC/compute-construct-firstprivate-clause.cpp b/clang/test/SemaOpenACC/compute-construct-firstprivate-clause.cpp
index 161e4012c08d56..4bee51530f44a3 100644
--- a/clang/test/SemaOpenACC/compute-construct-firstprivate-clause.cpp
+++ b/clang/test/SemaOpenACC/compute-construct-firstprivate-clause.cpp
@@ -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 at +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 at +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 at +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 at +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);
}
@@ -96,10 +96,10 @@ void NTTP() {
// NTTP's are only valid if it is a reference to something.
// expected-error at +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);
}
More information about the cfe-commits
mailing list