diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-09-20 20:11:31 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-09-20 20:11:31 +0000 |
commit | e85de8fcf9c0ea5f878140c2801be67a3663a518 (patch) | |
tree | 0b91e1c72bdc972a21bbaeca07872c8c26283258 /clang/test/OpenMP/target_codegen.cpp | |
parent | 0f245eccd6244267f64785714ed274ed62540799 (diff) | |
download | bcm5719-llvm-e85de8fcf9c0ea5f878140c2801be67a3663a518.tar.gz bcm5719-llvm-e85de8fcf9c0ea5f878140c2801be67a3663a518.zip |
[OPENMP] Support for re-declarations when checking captured variables.
Need to check for variables re-declarations when checking that the
variable was already captured in the captured region.
llvm-svn: 313805
Diffstat (limited to 'clang/test/OpenMP/target_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/target_codegen.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/OpenMP/target_codegen.cpp b/clang/test/OpenMP/target_codegen.cpp index c457045c17c..9d68dd4a1e5 100644 --- a/clang/test/OpenMP/target_codegen.cpp +++ b/clang/test/OpenMP/target_codegen.cpp @@ -79,6 +79,9 @@ struct TT{ ty Y; }; +int global; +extern int global; + // CHECK: define {{.*}}[[FOO:@.+]]( int foo(int n) { int a = 0; @@ -109,7 +112,7 @@ int foo(int n) { // CHECK: call void [[HVT1:@.+]](i[[SZ]] {{[^,]+}}) #pragma omp target if(0) { - a += 1; + global += 1; } // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i32 -1, i8* @{{[^,]+}}, i32 1, i8** [[BP:%[^,]+]], i8** [[P:%[^,]+]], i[[SZ]]* getelementptr inbounds ([1 x i[[SZ]]], [1 x i[[SZ]]]* [[SIZET2]], i32 0, i32 0), i32* getelementptr inbounds ([1 x i32], [1 x i32]* [[MAPT2]], i32 0, i32 0)) |