diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-03 10:21:46 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-03 10:21:46 +0000 |
commit | b500101e1ce02ace5dc0aa1e63a40e28928e37c2 (patch) | |
tree | 67cb982ed2733a2f7aced8a4b34aecde2452405f /clang/test/OpenMP/parallel_for_codegen.cpp | |
parent | 5055685cda022119052d86cb468cf2b7f4d19a13 (diff) | |
download | bcm5719-llvm-b500101e1ce02ace5dc0aa1e63a40e28928e37c2.tar.gz bcm5719-llvm-b500101e1ce02ace5dc0aa1e63a40e28928e37c2.zip |
[OPENMP] Fix for http://llvm.org/PR24687: ICE on compilation of R package TPmsm.
Fixed capturing of VLAs in 'private' clause of the OpenMP directives.
llvm-svn: 246757
Diffstat (limited to 'clang/test/OpenMP/parallel_for_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_for_codegen.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/OpenMP/parallel_for_codegen.cpp b/clang/test/OpenMP/parallel_for_codegen.cpp index 9fda8404c6e..314ba43ec6b 100644 --- a/clang/test/OpenMP/parallel_for_codegen.cpp +++ b/clang/test/OpenMP/parallel_for_codegen.cpp @@ -378,8 +378,9 @@ int foo() {return 0;}; // TERM_DEBUG-LABEL: parallel_for // CLEANUP: parallel_for -void parallel_for(float *a) { -#pragma omp parallel for schedule(static, 5) +void parallel_for(float *a, int n) { + float arr[n]; +#pragma omp parallel for schedule(static, 5) private(arr) // TERM_DEBUG-NOT: __kmpc_global_thread_num // TERM_DEBUG: call void @__kmpc_for_static_init_4u({{.+}}), !dbg [[DBG_LOC_START:![0-9]+]] // TERM_DEBUG: invoke i32 {{.*}}foo{{.*}}() @@ -395,7 +396,7 @@ void parallel_for(float *a) { // CLEANUP: call void @__kmpc_for_static_fini({{.+}}) // CLEANUP: call {{.+}} @__kmpc_barrier({{.+}}) for (unsigned i = 131071; i <= 2147483647; i += 127) - a[i] += foo(); + a[i] += foo() + arr[i]; } // Check source line corresponds to "#pragma omp parallel for schedule(static, 5)" above: // TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-4]], |