diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-19 08:44:56 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-19 08:44:56 +0000 |
| commit | ccb59ec9b582101f4c32630f6c1b9f1f8f6e1474 (patch) | |
| tree | f903455dc67ca406dd370162b14fa9d31302eaf3 /clang/test | |
| parent | fa7c2da1000dc079b75c082b2705c96de310ef04 (diff) | |
| download | bcm5719-llvm-ccb59ec9b582101f4c32630f6c1b9f1f8f6e1474.tar.gz bcm5719-llvm-ccb59ec9b582101f4c32630f6c1b9f1f8f6e1474.zip | |
[OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.
Currently runtime does not allow to support variably modified types for 'private' and 'firstprivate' clauses in 'task' directives.
llvm-svn: 237674
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/OpenMP/single_copyprivate_messages.cpp | 2 | ||||
| -rw-r--r-- | clang/test/OpenMP/task_firstprivate_messages.cpp | 5 | ||||
| -rw-r--r-- | clang/test/OpenMP/task_private_messages.cpp | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/OpenMP/single_copyprivate_messages.cpp b/clang/test/OpenMP/single_copyprivate_messages.cpp index a2ffdef033d..f941c8e9b36 100644 --- a/clang/test/OpenMP/single_copyprivate_messages.cpp +++ b/clang/test/OpenMP/single_copyprivate_messages.cpp @@ -106,7 +106,7 @@ T tmain(T argc, C **argv) { } void bar(S4 a[2], int n, int b[n]) { // expected-note {{'b' defined here}} -#pragma omp single copyprivate(a, b) // expected-error {{'operator=' is a private member of 'S4'}} expected-error {{arguments of OpenMP clause 'copyprivate' cannot be of variably-modified type 'int [n]'}} +#pragma omp single copyprivate(a, b) // expected-error {{'operator=' is a private member of 'S4'}} expected-error {{arguments of OpenMP clause 'copyprivate' in '#pragma omp single' directive cannot be of variably-modified type 'int [n]'}} foo(); } diff --git a/clang/test/OpenMP/task_firstprivate_messages.cpp b/clang/test/OpenMP/task_firstprivate_messages.cpp index c3c2ae053ee..4eba5b25fa9 100644 --- a/clang/test/OpenMP/task_firstprivate_messages.cpp +++ b/clang/test/OpenMP/task_firstprivate_messages.cpp @@ -51,6 +51,11 @@ public: S3 h; #pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}} +void bar(int n, int b[n]) { // expected-note {{'b' defined here}} +#pragma omp task firstprivate(b) // expected-error {{arguments of OpenMP clause 'firstprivate' in '#pragma omp task' directive cannot be of variably-modified type 'int [n]'}} + foo(); +} + namespace A { double x; #pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}} diff --git a/clang/test/OpenMP/task_private_messages.cpp b/clang/test/OpenMP/task_private_messages.cpp index bf2a24a4a0c..59a4e61908d 100644 --- a/clang/test/OpenMP/task_private_messages.cpp +++ b/clang/test/OpenMP/task_private_messages.cpp @@ -45,6 +45,11 @@ public: int threadvar; #pragma omp threadprivate(threadvar) // expected-note {{defined as threadprivate or thread local}} +void bar(int n, int b[n]) { // expected-note {{'b' defined here}} +#pragma omp task private(b) // expected-error {{arguments of OpenMP clause 'private' in '#pragma omp task' directive cannot be of variably-modified type 'int [n]'}} + foo(); +} + namespace A { double x; #pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}} |

