diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-29 20:17:42 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-29 20:17:42 +0000 |
| commit | f07946e1011b7874fda9046f9a6717fa1586ce7c (patch) | |
| tree | 194c51a1f0287141f6b05df055a92cf65393311b /clang/test/OpenMP/distribute_firstprivate_messages.cpp | |
| parent | c045c557b07a084a5dc2de336fdc807e87589963 (diff) | |
| download | bcm5719-llvm-f07946e1011b7874fda9046f9a6717fa1586ce7c.tar.gz bcm5719-llvm-f07946e1011b7874fda9046f9a6717fa1586ce7c.zip | |
[OPENMP]Fix PR39372: Does not complain about loop bound variable not
being shared.
According to the standard, the variables with unspecified data-sharing
attributes in presence of `default(none)` clause must be reported to
users. Compiler did not generate error reports for the variables used in
other OpenMP regions. Patch fixes this.
llvm-svn: 345533
Diffstat (limited to 'clang/test/OpenMP/distribute_firstprivate_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/distribute_firstprivate_messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/OpenMP/distribute_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_firstprivate_messages.cpp index ea0e7b4a231..8acc6b643f0 100644 --- a/clang/test/OpenMP/distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_firstprivate_messages.cpp @@ -93,7 +93,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} + #pragma omp distribute firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'const S3' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -101,11 +101,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate(ba) + #pragma omp distribute firstprivate(ba) // expected-warning {{Non-trivial type 'const S2 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} + #pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams |

