diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/OpenMP/task_codegen.cpp | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Diffstat (limited to 'test/OpenMP/task_codegen.cpp')
-rw-r--r-- | test/OpenMP/task_codegen.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/OpenMP/task_codegen.cpp b/test/OpenMP/task_codegen.cpp index fefe8b4329c21..b034bb29c8870 100644 --- a/test/OpenMP/task_codegen.cpp +++ b/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, @@ -278,5 +279,18 @@ int main() { // CHECK: load i32*, i32** % // CHECK: store i32 4, i32* % // CHECK: call i32 @__kmpc_omp_task(% + +struct S1 { + int a; + S1() { taskinit(); } + void taskinit() { +#pragma omp task + a = 0; + } +} s1; + +// CHECK-LABEL: taskinit +// CHECK: call i8* @__kmpc_omp_task_alloc( + #endif |