diff options
author | Kelvin Li <kkwli0@gmail.com> | 2016-07-20 20:45:29 +0000 |
---|---|---|
committer | Kelvin Li <kkwli0@gmail.com> | 2016-07-20 20:45:29 +0000 |
commit | ad9ecbab42539a722fa9688eca509912cfeb7df8 (patch) | |
tree | 4b3baa9818f565835d0b8b2f0a69d6863f8fda29 /clang/test/OpenMP/target_map_messages.cpp | |
parent | 4f90c2f9df50d244a238e845c39886e8e6ddc2dd (diff) | |
download | bcm5719-llvm-ad9ecbab42539a722fa9688eca509912cfeb7df8.tar.gz bcm5719-llvm-ad9ecbab42539a722fa9688eca509912cfeb7df8.zip |
[OpenMP] Allow negative lower bound in array sections based on pointers
OpenMP 4.5 removed the restriction that array section lower bound must be non negative.
This change is to allow negative values for array section based on pointers.
For array section based on array type there is still a restriction: "The array section must be a subset of the original array."
Patch by David S.
Differential Revision: https://reviews.llvm.org/D22481
llvm-svn: 276177
Diffstat (limited to 'clang/test/OpenMP/target_map_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/target_map_messages.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/OpenMP/target_map_messages.cpp b/clang/test/OpenMP/target_map_messages.cpp index f9bb9410c49..a3b2168fedb 100644 --- a/clang/test/OpenMP/target_map_messages.cpp +++ b/clang/test/OpenMP/target_map_messages.cpp @@ -51,6 +51,10 @@ struct SA { {} #pragma omp target map(to:b,e[:]) {} + #pragma omp target map(b[-1:]) // expected-error {{array section must be a subset of the original array}} + {} + #pragma omp target map(b[:-1]) // expected-error {{section length is evaluated to a negative value -1}} + {} #pragma omp target map(always, tofrom: c,f) {} |