summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/task_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-10-25 15:35:27 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-10-25 15:35:27 +0000
commit8fc7b5f92217bc28e911ca27e20d2880e412aa06 (patch)
treec693aa62309f078c5a3712d5683bdfacc3837a1d /clang/test/OpenMP/task_codegen.cpp
parent8f11ddc397471379a71fa86345e13d35d1ea5fdc (diff)
downloadbcm5719-llvm-8fc7b5f92217bc28e911ca27e20d2880e412aa06.tar.gz
bcm5719-llvm-8fc7b5f92217bc28e911ca27e20d2880e412aa06.zip
[OPENMP]Fix PR39422: variables are not firstprivatized in task context.
According to the OpenMP standard, In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above is firstprivatized. Compiler tries to implement this, but if the variable is not directly used in the task context, this variable may not be firstprivatized. Patch fixes this problem. llvm-svn: 345277
Diffstat (limited to 'clang/test/OpenMP/task_codegen.cpp')
-rw-r--r--clang/test/OpenMP/task_codegen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/OpenMP/task_codegen.cpp b/clang/test/OpenMP/task_codegen.cpp
index 05767726f05..b034bb29c88 100644
--- a/clang/test/OpenMP/task_codegen.cpp
+++ b/clang/test/OpenMP/task_codegen.cpp
@@ -107,6 +107,7 @@ int main() {
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])
#pragma omp task untied
{
+#pragma omp critical
a = 1;
}
// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1,
OpenPOWER on IntegriCloud