summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/single_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-02-26 10:27:34 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-02-26 10:27:34 +0000
commit8cbe0a6b626eb7e158f339c20f4af74996d9d4ac (patch)
tree0bb66795e605d91d469f53a0a6076163f3c9b3e3 /clang/test/OpenMP/single_codegen.cpp
parenta42de763ac54f79ce2f9abc8330e107275b2afc9 (diff)
downloadbcm5719-llvm-8cbe0a6b626eb7e158f339c20f4af74996d9d4ac.tar.gz
bcm5719-llvm-8cbe0a6b626eb7e158f339c20f4af74996d9d4ac.zip
[OPENMP] Fixed codegen for directives without function outlining.
Fixed crash on codegen for directives like 'omp for', 'omp single' etc. inside of the 'omp parallel', 'omp task' etc. regions. llvm-svn: 230621
Diffstat (limited to 'clang/test/OpenMP/single_codegen.cpp')
-rw-r--r--clang/test/OpenMP/single_codegen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/OpenMP/single_codegen.cpp b/clang/test/OpenMP/single_codegen.cpp
index e67af0f5089..b98da375914 100644
--- a/clang/test/OpenMP/single_codegen.cpp
+++ b/clang/test/OpenMP/single_codegen.cpp
@@ -43,4 +43,13 @@ int main() {
return a;
}
+// CHECK-LABEL: parallel_single
+void parallel_single(float *a) {
+#pragma omp parallel
+#pragma omp single
+ // CHECK-NOT: __kmpc_global_thread_num
+ for (unsigned i = 131071; i <= 2147483647; i += 127)
+ a[i] += i;
+}
+
#endif
OpenPOWER on IntegriCloud