diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-05-06 20:07:20 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-05-06 20:07:20 +0000 |
commit | 03fbaba68257f6ebdec4aceec394580bd29e0b13 (patch) | |
tree | 0644b6d3d4b29e04f7ac27470456f2ad0a736425 /test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp | |
parent | 1c40858fc28adb9b87e3f8f8bd5b4319defa9624 (diff) |
[OPENMP]Fix PR41767: diagnose DSA for variables in clauses with
default(none).
If the combined directive has default(none) clause and has clauses for
inner directive that reference some variables, for which data-sharing
attributes are not specified, the error messages should be emitted for
such variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp')
-rw-r--r-- | test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp index 6f990f7bd2..328e191ed3 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp @@ -106,6 +106,8 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(distribute : argc) // expected-error {{directive name modifier 'distribute' is not allowed for '#pragma omp target teams distribute parallel for'}} for (i = 0; i < argc; ++i) foo(); +#pragma omp target teams distribute parallel for default(none) if(argc+argv[0][0]) // expected-error {{variable 'argv' must have explicitly specified data sharing attributes}} expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} expected-note 2 {{explicit data sharing attribute requested here}} + for (i = 0; i < argc; ++i) foo(); return tmain(argc, argv); } |