diff options
Diffstat (limited to 'clang/test/OpenMP')
24 files changed, 175 insertions, 0 deletions
diff --git a/clang/test/OpenMP/cancel_if_messages.cpp b/clang/test/OpenMP/cancel_if_messages.cpp index 3d629c927e9..222087ca9e6 100644 --- a/clang/test/OpenMP/cancel_if_messages.cpp +++ b/clang/test/OpenMP/cancel_if_messages.cpp @@ -9,6 +9,16 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp parallel + { +#pragma omp cancel parallel if (cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; + } +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp index a06ff2377c0..e628a15c3ab 100644 --- a/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp distribute parallel for if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp index 7769272026e..6cf18faf0a8 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp distribute parallel for simd if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/parallel_for_if_messages.cpp b/clang/test/OpenMP/parallel_for_if_messages.cpp index 32f9ef3a7de..56bb06be0cc 100644 --- a/clang/test/OpenMP/parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/parallel_for_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp parallel for if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/parallel_for_simd_if_messages.cpp b/clang/test/OpenMP/parallel_for_simd_if_messages.cpp index aa1e302d042..bab9339d491 100644 --- a/clang/test/OpenMP/parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp parallel for simd if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/parallel_if_messages.cpp b/clang/test/OpenMP/parallel_if_messages.cpp index 7f802a9e423..f095e66bbfa 100644 --- a/clang/test/OpenMP/parallel_if_messages.cpp +++ b/clang/test/OpenMP/parallel_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp parallel if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/parallel_sections_if_messages.cpp b/clang/test/OpenMP/parallel_sections_if_messages.cpp index 8d36b6d5d30..b7c92df4f30 100644 --- a/clang/test/OpenMP/parallel_sections_if_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_if_messages.cpp @@ -9,6 +9,14 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp parallel sections if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + { + ; + } +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_data_if_messages.cpp b/clang/test/OpenMP/target_data_if_messages.cpp index c6f9b4b34ee..29f898c6d9f 100644 --- a/clang/test/OpenMP/target_data_if_messages.cpp +++ b/clang/test/OpenMP/target_data_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target data map(argc) if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { diff --git a/clang/test/OpenMP/target_enter_data_if_messages.cpp b/clang/test/OpenMP/target_enter_data_if_messages.cpp index 5123d607dc6..21019e9ae7f 100644 --- a/clang/test/OpenMP/target_enter_data_if_messages.cpp +++ b/clang/test/OpenMP/target_enter_data_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target enter data map(to:argc) if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { diff --git a/clang/test/OpenMP/target_exit_data_if_messages.cpp b/clang/test/OpenMP/target_exit_data_if_messages.cpp index c45b32ff3fe..7b2385c16cd 100644 --- a/clang/test/OpenMP/target_exit_data_if_messages.cpp +++ b/clang/test/OpenMP/target_exit_data_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target exit data map(from: argc) if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { diff --git a/clang/test/OpenMP/target_if_messages.cpp b/clang/test/OpenMP/target_if_messages.cpp index e6b667f2cff..f381e9eb91e 100644 --- a/clang/test/OpenMP/target_if_messages.cpp +++ b/clang/test/OpenMP/target_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_parallel_for_if_messages.cpp b/clang/test/OpenMP/target_parallel_for_if_messages.cpp index 445dc1775b0..a5a181b9d27 100644 --- a/clang/test/OpenMP/target_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target parallel for if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_if_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_if_messages.cpp index b0da8017019..ef9a2089d10 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target parallel for simd if(parallel: cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_parallel_if_messages.cpp b/clang/test/OpenMP/target_parallel_if_messages.cpp index 460e0c8655f..ac498a7108b 100644 --- a/clang/test/OpenMP/target_parallel_if_messages.cpp +++ b/clang/test/OpenMP/target_parallel_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target parallel if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_simd_if_messages.cpp b/clang/test/OpenMP/target_simd_if_messages.cpp index 94d2ab308da..5f3e9e3910a 100644 --- a/clang/test/OpenMP/target_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_simd_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target simd if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_teams_distribute_if_messages.cpp b/clang/test/OpenMP/target_teams_distribute_if_messages.cpp index fd1ffb08cbe..499cd3ac580 100644 --- a/clang/test/OpenMP/target_teams_distribute_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target teams distribute if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp index e1114028b68..6df23076472 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target teams distribute parallel for if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp index 59c75893a17..e88c1f1dbbf 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp @@ -9,6 +9,14 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target teams distribute parallel for simd if (parallel \ + : cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_if_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_if_messages.cpp index 7134a8394cb..53af6e759d2 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target teams distribute simd if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_teams_if_messages.cpp b/clang/test/OpenMP/target_teams_if_messages.cpp index 8d3d690d631..4bc82a34939 100644 --- a/clang/test/OpenMP/target_teams_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target teams if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/target_update_if_messages.cpp b/clang/test/OpenMP/target_update_if_messages.cpp index 9ded332b04e..d967713e456 100644 --- a/clang/test/OpenMP/target_update_if_messages.cpp +++ b/clang/test/OpenMP/target_update_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target update to(argc) if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/task_if_messages.cpp b/clang/test/OpenMP/task_if_messages.cpp index 305af22149d..2d47b32b9a1 100644 --- a/clang/test/OpenMP/task_if_messages.cpp +++ b/clang/test/OpenMP/task_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp task if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp index 6f724b05017..b76599d41a4 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp @@ -9,6 +9,14 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target +#pragma omp teams distribute parallel for if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp index c01e6e87e39..39a0b326383 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp @@ -9,6 +9,14 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp target +#pragma omp teams distribute parallel for simd if(cond) // expected-warning {{variable 'cond' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} |