From 00ad5635bb0511b53b1052a1b8795d055cd179e1 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 26 Feb 2015 10:27:34 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230621 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/OpenMP/single_codegen.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/OpenMP/single_codegen.cpp') diff --git a/test/OpenMP/single_codegen.cpp b/test/OpenMP/single_codegen.cpp index e67af0f508..b98da37591 100644 --- a/test/OpenMP/single_codegen.cpp +++ b/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 -- cgit v1.2.3