summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/critical_codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/critical_codegen.cpp')
-rw-r--r--clang/test/OpenMP/critical_codegen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/OpenMP/critical_codegen.cpp b/clang/test/OpenMP/critical_codegen.cpp
index dc2c3fc7595..e44e2202e9a 100644
--- a/clang/test/OpenMP/critical_codegen.cpp
+++ b/clang/test/OpenMP/critical_codegen.cpp
@@ -38,6 +38,14 @@ int main() {
// CHECK: call {{.*}}void @__kmpc_end_critical([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], [8 x i32]* [[THE_NAME_LOCK1]])
#pragma omp critical(the_name1) hint(23)
foo();
+// CHECK: call {{.*}}void @__kmpc_critical([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], [8 x i32]* [[THE_NAME_LOCK]])
+// CHECK-NOT: call {{.*}}void @__kmpc_end_critical(
+ if (a)
+#pragma omp critical(the_name)
+ while (1)
+ ;
+// CHECK: call {{.*}}void [[FOO]]()
+ foo();
// CHECK-NOT: call void @__kmpc_critical
// CHECK-NOT: call void @__kmpc_end_critical
return a;
OpenPOWER on IntegriCloud