diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-08 15:45:24 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-08 15:45:24 +0000 |
commit | a914888b49590a38f4571434ddf951c687889e56 (patch) | |
tree | 9eefc6e2030d0706e91c35cfe5d31c85ddd39e0b /clang/test | |
parent | 320a28200f24452b224fb472529adba0964399ab (diff) | |
download | bcm5719-llvm-a914888b49590a38f4571434ddf951c687889e56.tar.gz bcm5719-llvm-a914888b49590a38f4571434ddf951c687889e56.zip |
[OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
NFC.
llvm-svn: 365334
Diffstat (limited to 'clang/test')
484 files changed, 2074 insertions, 1954 deletions
diff --git a/clang/test/OpenMP/allocate_allocator_messages.cpp b/clang/test/OpenMP/allocate_allocator_messages.cpp index 5ba4f2a506b..fced4cae9d5 100644 --- a/clang/test/OpenMP/allocate_allocator_messages.cpp +++ b/clang/test/OpenMP/allocate_allocator_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized struct St{ int a; diff --git a/clang/test/OpenMP/atomic_messages.c b/clang/test/OpenMP/atomic_messages.c index 92b7cd5b6ae..bace18aba9e 100644 --- a/clang/test/OpenMP/atomic_messages.c +++ b/clang/test/OpenMP/atomic_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int foo() { L1: diff --git a/clang/test/OpenMP/atomic_messages.cpp b/clang/test/OpenMP/atomic_messages.cpp index d7fa8c9e075..e4ca628075f 100644 --- a/clang/test/OpenMP/atomic_messages.cpp +++ b/clang/test/OpenMP/atomic_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int foo() { L1: diff --git a/clang/test/OpenMP/cancel_if_messages.cpp b/clang/test/OpenMP/cancel_if_messages.cpp index dc24fa4c997..3d629c927e9 100644 --- a/clang/test/OpenMP/cancel_if_messages.cpp +++ b/clang/test/OpenMP/cancel_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp parallel { #pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}} @@ -20,7 +21,7 @@ int tmain(T argc, S **argv) { #pragma omp cancel parallel if () // expected-error {{expected expression}} #pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}} - #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] + z) #pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}} #pragma omp cancel parallel if (S) // expected-error {{'S' does not refer to a value}} #pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -40,6 +41,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp parallel { #pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}} @@ -47,7 +49,7 @@ int main(int argc, char **argv) { #pragma omp cancel parallel if () // expected-error {{expected expression}} #pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}} - #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] - z) #pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}} #pragma omp cancel parallel if (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/cancel_messages.cpp b/clang/test/OpenMP/cancel_messages.cpp index df6dcdf2ff6..fd19f1f373e 100644 --- a/clang/test/OpenMP/cancel_messages.cpp +++ b/clang/test/OpenMP/cancel_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int main(int argc, char **argv) { #pragma omp cancellation // expected-error {{expected an OpenMP directive}} diff --git a/clang/test/OpenMP/critical_messages.cpp b/clang/test/OpenMP/critical_messages.cpp index 9222233d4a6..1eec70e2833 100644 --- a/clang/test/OpenMP/critical_messages.cpp +++ b/clang/test/OpenMP/critical_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized int foo(); diff --git a/clang/test/OpenMP/declare_reduction_messages.c b/clang/test/OpenMP/declare_reduction_messages.c index 27e9e6e2e25..4a0d6ef4028 100644 --- a/clang/test/OpenMP/declare_reduction_messages.c +++ b/clang/test/OpenMP/declare_reduction_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int temp; // expected-note 6 {{'temp' declared here}} diff --git a/clang/test/OpenMP/declare_reduction_messages.cpp b/clang/test/OpenMP/declare_reduction_messages.cpp index 0a79d6a0a64..a674af7151d 100644 --- a/clang/test/OpenMP/declare_reduction_messages.cpp +++ b/clang/test/OpenMP/declare_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s -Wuninitialized int temp; // expected-note 7 {{'temp' declared here}} diff --git a/clang/test/OpenMP/distribute_collapse_messages.cpp b/clang/test/OpenMP/distribute_collapse_messages.cpp index e4164daaed1..33035f2bc22 100644 --- a/clang/test/OpenMP/distribute_collapse_messages.cpp +++ b/clang/test/OpenMP/distribute_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_dist_schedule_messages.cpp index 9f91f41f864..cd232f40feb 100644 --- a/clang/test/OpenMP/distribute_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/distribute_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -31,7 +31,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} + #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); @@ -41,6 +41,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { +int z; #pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -55,7 +56,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} + #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 -z ) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); diff --git a/clang/test/OpenMP/distribute_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_firstprivate_messages.cpp index e6dfd71c55d..c13f142f30d 100644 --- a/clang/test/OpenMP/distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration extern S1 a; class S2 { mutable int a; - + public: S2() : a(0) {} S2(const S2 &s2) : a(s2.a) {} @@ -26,7 +26,7 @@ const S2 ba[5]; class S3 { int a; S3 &operator=(const S3 &s3); - + public: S3() : a(0) {} // expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}} S3(S3 &s3) : a(s3.a) {} // expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}} @@ -65,7 +65,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) foo(); @@ -111,7 +111,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate(da) + #pragma omp distribute firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp index c3298f1756d..f0bd4c28403 100644 --- a/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_parallel_for_copyin_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_copyin_messages.cpp index 5182f24bdb1..26bf6c61288 100644 --- a/clang/test/OpenMP/distribute_parallel_for_copyin_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_parallel_for_default_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_default_messages.cpp index 892772b1e8f..0629ba096d0 100644 --- a/clang/test/OpenMP/distribute_parallel_for_default_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp index adcef0bab92..07e7704dffd 100644 --- a/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -13,10 +13,9 @@ struct S1; // expected-note {{declared here}} expected-note {{declared here}} template <class T, int N> T tmain(T argc) { - T b = argc, c, d, e, f, g; + T b = argc, c, d, e, f, g, z; char ** argv; static T a; -// CHECK: static T a; #pragma omp target #pragma omp teams #pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +46,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams @@ -61,6 +60,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -91,7 +91,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp index 3cebf0cd675..1678a27f213 100644 --- a/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams @@ -126,7 +126,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp distribute parallel for firstprivate(k, h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -189,7 +189,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams @@ -294,7 +294,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp distribute parallel for firstprivate(k, h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp index 85e78d0b925..a06ff2377c0 100644 --- a/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}} @@ -56,7 +56,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for if(argc) +#pragma omp distribute parallel for if(argc+z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -95,7 +95,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}} @@ -158,7 +158,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for if(parallel : argc) +#pragma omp distribute parallel for if(parallel : argc-z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp index 4039982ef5d..b91f41e6b66 100644 --- a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_parallel_for_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_messages.cpp index 6bda5d106b7..248d09b8cc6 100644 --- a/clang/test/OpenMP/distribute_parallel_for_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp index 110f5d70f8d..ab301cc5172 100644 --- a/clang/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -52,7 +52,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for num_threads (argc) +#pragma omp distribute parallel for num_threads (argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -63,7 +63,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -82,7 +82,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}} +#pragma omp distribute parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp index 6fadc12442a..729a4a75596 100644 --- a/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp index febf4b05643..5c29a184eba 100644 --- a/clang/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp index 99f928a3456..75b4112feee 100644 --- a/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -176,7 +176,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp distribute parallel for reduction(+ : ba, z) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -272,7 +272,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -434,7 +434,7 @@ int main(int argc, char **argv) { #pragma omp parallel private(fl) #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : fl) +#pragma omp distribute parallel for reduction(+ : fl, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel reduction(* : fl) diff --git a/clang/test/OpenMP/distribute_parallel_for_schedule_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_schedule_messages.cpp index 1f521d4f6fd..80dc2339610 100644 --- a/clang/test/OpenMP/distribute_parallel_for_schedule_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}} @@ -57,7 +58,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2) +#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -86,6 +87,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}} @@ -124,7 +126,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) +#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp index 6700b80cad3..d5a68f65b7b 100644 --- a/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized struct S1; // expected-note 2 {{declared here}} diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp index 40d72418c72..27f5f60c1d2 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp index 9399594be20..a3e324d32bc 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp index 2d72925518d..e382a221143 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -126,7 +126,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}} diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp index 3f00436181e..b9c5546ec5d 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp index f029b0e187f..ed7b19111de 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams @@ -61,6 +61,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp index f574335baf8..aa33807c424 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -101,7 +101,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd firstprivate(argc) +#pragma omp distribute parallel for simd firstprivate(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -189,7 +189,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -248,7 +248,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd firstprivate(ba) // OK +#pragma omp distribute parallel for simd firstprivate(ba, z) // OK for (i = 0; i < argc; ++i) foo(); #pragma omp target 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 0f9e12381f0..7769272026e 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}} @@ -32,7 +32,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -95,7 +95,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}} @@ -114,7 +114,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp index 71658a66506..110e102e64b 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -103,7 +103,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(argc) +#pragma omp distribute parallel for simd lastprivate(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -237,7 +237,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(ba) +#pragma omp distribute parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp index 8f2df4215bc..e8521c06d93 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp index 2c0d7ab7428..ef17dd499d2 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c b/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c index c2bee7ffa70..e4cefcbf721 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c +++ b/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute parallel for simd'}} #pragma omp distribute parallel for simd diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp index 5f5165d979c..9f9de197aca 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -63,7 +63,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -82,7 +82,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd num_threads (z/argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp index 50a7fb5ac93..615a45f584b 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp index d81f7d99207..d159ca94e95 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp index 150f50171a0..0b27fe25e42 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -151,7 +151,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(&& : argc) +#pragma omp distribute parallel for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -272,7 +272,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -400,7 +400,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp distribute parallel for simd reduction(+ : z, o) // expected-error {{no viable overloaded '='}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp index 7e76c1f6ab2..e39b5d9fbc5 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp index 8a5ffd15942..84cadd41cf2 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} @@ -57,7 +58,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2) +#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -86,6 +87,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} @@ -124,7 +126,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) +#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 -z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp index d037e4cd93b..8e21c07c6c4 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized struct S1; // expected-note 2 {{declared here}} @@ -54,7 +54,7 @@ T tmain(T argc, S **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; int acc = 0; int n = 1000; @@ -103,7 +103,7 @@ T tmain(T argc, S **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared (argc) +#pragma omp distribute parallel for simd shared (argc, z) for(int k = 0 ; k < n ; k++) { acc++; } @@ -228,7 +228,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; int acc = 0; int n = argc; @@ -277,7 +277,7 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared (argc) +#pragma omp distribute parallel for simd shared (argc, z) for(int k = 0 ; k < n ; k++) { acc++; } diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp index 9c1c5520330..7cede341626 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_private_messages.cpp b/clang/test/OpenMP/distribute_private_messages.cpp index fe5c0257a99..b3bdaffcbd1 100644 --- a/clang/test/OpenMP/distribute_private_messages.cpp +++ b/clang/test/OpenMP/distribute_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -34,7 +34,7 @@ class S4 { public: S4(int v):a(v) { } }; -class S5 { +class S5 { int a; S5():a(0) {} // expected-note {{implicitly declared private here}} public: diff --git a/clang/test/OpenMP/distribute_simd_aligned_messages.cpp b/clang/test/OpenMP/distribute_simd_aligned_messages.cpp index 8c4a8d95699..0febeed5864 100644 --- a/clang/test/OpenMP/distribute_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/distribute_simd_collapse_messages.cpp b/clang/test/OpenMP/distribute_simd_collapse_messages.cpp index 204719a2e6d..2d3983cc555 100644 --- a/clang/test/OpenMP/distribute_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp index c659abe71ba..794681c0264 100644 --- a/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams @@ -55,7 +55,7 @@ T tmain(T argc) { #pragma omp target #pragma omp teams -#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams @@ -69,6 +69,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -106,7 +107,7 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp index 6059415582d..b73ecc274d0 100644 --- a/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -111,7 +111,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute simd firstprivate(a, b) // 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}} +#pragma omp distribute simd firstprivate(z, a, b) // 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}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -189,7 +189,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -223,7 +223,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd firstprivate(argc) +#pragma omp distribute simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp index 6037551c5b4..50a1fc387e8 100644 --- a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -103,7 +103,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(argc) +#pragma omp distribute simd lastprivate(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/clang/test/OpenMP/distribute_simd_linear_messages.cpp b/clang/test/OpenMP/distribute_simd_linear_messages.cpp index e5c2aceea83..53bd4c05da7 100644 --- a/clang/test/OpenMP/distribute_simd_linear_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/clang/test/OpenMP/distribute_simd_loop_messages.cpp b/clang/test/OpenMP/distribute_simd_loop_messages.cpp index b46bdad0b64..ee57cd5af33 100644 --- a/clang/test/OpenMP/distribute_simd_loop_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized static int sii; // expected-note@+1 {{defined as threadprivate or thread local}} diff --git a/clang/test/OpenMP/distribute_simd_misc_messages.c b/clang/test/OpenMP/distribute_simd_misc_messages.c index 2cb5e97273c..5286e5f8d6d 100644 --- a/clang/test/OpenMP/distribute_simd_misc_messages.c +++ b/clang/test/OpenMP/distribute_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute simd'}} #pragma omp distribute simd diff --git a/clang/test/OpenMP/distribute_simd_private_messages.cpp b/clang/test/OpenMP/distribute_simd_private_messages.cpp index 47b1b0c74fa..95564226b81 100644 --- a/clang/test/OpenMP/distribute_simd_private_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/distribute_simd_reduction_messages.cpp b/clang/test/OpenMP/distribute_simd_reduction_messages.cpp index b1fe7f684da..44868770251 100644 --- a/clang/test/OpenMP/distribute_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -89,6 +89,7 @@ T tmain(T argc) { const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; T i; + long z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -156,7 +157,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} +#pragma omp distribute simd reduction(^ : z, T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -272,7 +273,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -335,7 +336,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(&& : argc) +#pragma omp distribute simd reduction(&& : z, argc) for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_simd_safelen_messages.cpp b/clang/test/OpenMP/distribute_simd_safelen_messages.cpp index 30c0976368f..c28b1bf1a1f 100644 --- a/clang/test/OpenMP/distribute_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp b/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp index 30c0976368f..c28b1bf1a1f 100644 --- a/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/flush_messages.cpp b/clang/test/OpenMP/flush_messages.cpp index 36a8ef6d492..5838e12ce8c 100644 --- a/clang/test/OpenMP/flush_messages.cpp +++ b/clang/test/OpenMP/flush_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized struct S1 { // expected-note 2 {{declared here}} int a; diff --git a/clang/test/OpenMP/for_collapse_messages.cpp b/clang/test/OpenMP/for_collapse_messages.cpp index 5530ddcc6a5..ce656515b1e 100644 --- a/clang/test/OpenMP/for_collapse_messages.cpp +++ b/clang/test/OpenMP/for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}} // expected-error@+2 2 {{expression is not an integral constant expression}} // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} - #pragma omp for collapse (argc + #pragma omp for collapse (argc for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/for_firstprivate_messages.cpp b/clang/test/OpenMP/for_firstprivate_messages.cpp index 22b034e0f20..de2ad14ae5a 100644 --- a/clang/test/OpenMP/for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/for_firstprivate_messages.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -207,7 +207,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}} +#pragma omp for firstprivate(a, b, c, d, f, k) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/for_lastprivate_messages.cpp b/clang/test/OpenMP/for_lastprivate_messages.cpp index 40222c1f5e8..919b40f9ccd 100644 --- a/clang/test/OpenMP/for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -112,7 +112,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp for lastprivate(k, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -163,7 +163,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -190,7 +190,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for lastprivate(argc) +#pragma omp for lastprivate(argc, k) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/for_linear_messages.cpp b/clang/test/OpenMP/for_linear_messages.cpp index c984aa5a9f0..3a54acb26b5 100644 --- a/clang/test/OpenMP/for_linear_messages.cpp +++ b/clang/test/OpenMP/for_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -104,7 +104,7 @@ S3 h; template<class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -128,7 +128,7 @@ template<class I, class C> int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp for linear(e, g) + #pragma omp for linear(e, g, k) for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; @@ -170,7 +170,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, k; int &j = i; #pragma omp for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -190,7 +190,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp for linear(a, b) + #pragma omp for linear(a, b, k) for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; diff --git a/clang/test/OpenMP/for_loop_messages.cpp b/clang/test/OpenMP/for_loop_messages.cpp index f5ee0d44429..7c2663f6181 100644 --- a/clang/test/OpenMP/for_loop_messages.cpp +++ b/clang/test/OpenMP/for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/for_misc_messages.c b/clang/test/OpenMP/for_misc_messages.c index 901d66dd688..e36a1c6db01 100644 --- a/clang/test/OpenMP/for_misc_messages.c +++ b/clang/test/OpenMP/for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}} #pragma omp for diff --git a/clang/test/OpenMP/for_private_messages.cpp b/clang/test/OpenMP/for_private_messages.cpp index 44a05f709ff..877d683ce62 100644 --- a/clang/test/OpenMP/for_private_messages.cpp +++ b/clang/test/OpenMP/for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/for_reduction_messages.cpp b/clang/test/OpenMP/for_reduction_messages.cpp index 397e54f1fc1..a082e5843e3 100644 --- a/clang/test/OpenMP/for_reduction_messages.cpp +++ b/clang/test/OpenMP/for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -147,11 +147,11 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} +#pragma omp for reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -245,7 +245,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -312,7 +312,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(max : argv[1]) +#pragma omp for reduction(max : argv[1], z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/for_schedule_messages.cpp b/clang/test/OpenMP/for_schedule_messages.cpp index f4b5b3a26d6..95e9a2a1ae8 100644 --- a/clang/test/OpenMP/for_schedule_messages.cpp +++ b/clang/test/OpenMP/for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -45,7 +46,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -82,6 +83,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -98,7 +100,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} + #pragma omp for schedule (static, 2+2-z)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; diff --git a/clang/test/OpenMP/for_simd_aligned_messages.cpp b/clang/test/OpenMP/for_simd_aligned_messages.cpp index fce9aca9989..c7122bbe4fb 100644 --- a/clang/test/OpenMP/for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/for_simd_collapse_messages.cpp b/clang/test/OpenMP/for_simd_collapse_messages.cpp index f5c130f30a3..2781bb9d5e2 100644 --- a/clang/test/OpenMP/for_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/for_simd_firstprivate_messages.cpp index b6b51d86868..6dba2f81be3 100644 --- a/clang/test/OpenMP/for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/for_simd_lastprivate_messages.cpp index b3589d90d7a..a69a3c18fb9 100644 --- a/clang/test/OpenMP/for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -160,7 +160,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -187,7 +187,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd lastprivate(argc) +#pragma omp for simd lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/for_simd_linear_messages.cpp b/clang/test/OpenMP/for_simd_linear_messages.cpp index ffa2233b55f..9df53aeacaa 100644 --- a/clang/test/OpenMP/for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -137,8 +137,9 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp parallel { int v = 0; + long z; int i; - #pragma omp for simd linear(v:i) + #pragma omp for simd linear(z, v:i) for (int k = 0; k < argc; ++k) { i = k; v += i; } } #pragma omp for simd linear(j) @@ -188,7 +189,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp for simd linear (a, b) + #pragma omp for simd linear(a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; @@ -201,7 +202,7 @@ int main(int argc, char **argv) { #pragma omp parallel { int i; - #pragma omp for simd linear(i) + #pragma omp for simd linear(i : i) for (int k = 0; k < argc; ++k) ++k; #pragma omp for simd linear(i : 4) for (int k = 0; k < argc; ++k) { ++k; i += 4; } diff --git a/clang/test/OpenMP/for_simd_loop_messages.cpp b/clang/test/OpenMP/for_simd_loop_messages.cpp index 29ab738dd14..2a5a6e87f78 100644 --- a/clang/test/OpenMP/for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/for_simd_misc_messages.c b/clang/test/OpenMP/for_simd_misc_messages.c index 4da2e6bb6c1..bdce97431c0 100644 --- a/clang/test/OpenMP/for_simd_misc_messages.c +++ b/clang/test/OpenMP/for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for simd'}} #pragma omp for simd diff --git a/clang/test/OpenMP/for_simd_private_messages.cpp b/clang/test/OpenMP/for_simd_private_messages.cpp index ff3249e64ca..0bf33797e0b 100644 --- a/clang/test/OpenMP/for_simd_private_messages.cpp +++ b/clang/test/OpenMP/for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/for_simd_reduction_messages.cpp b/clang/test/OpenMP/for_simd_reduction_messages.cpp index c4bed65d98b..9a112bc2c5a 100644 --- a/clang/test/OpenMP/for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -87,7 +87,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -146,7 +146,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -236,7 +236,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -287,7 +287,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(&& : argc) +#pragma omp for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/for_simd_safelen_messages.cpp b/clang/test/OpenMP/for_simd_safelen_messages.cpp index 6868b938c2c..c97e2a951a8 100644 --- a/clang/test/OpenMP/for_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/for_simd_schedule_messages.cpp b/clang/test/OpenMP/for_simd_schedule_messages.cpp index b330f8cfd00..08e3c022cf2 100644 --- a/clang/test/OpenMP/for_simd_schedule_messages.cpp +++ b/clang/test/OpenMP/for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -35,7 +36,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +74,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/for_simd_simdlen_messages.cpp b/clang/test/OpenMP/for_simd_simdlen_messages.cpp index 86cc4690a98..5ae2fbbc8da 100644 --- a/clang/test/OpenMP/for_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/master_messages.cpp b/clang/test/OpenMP/master_messages.cpp index 702da24b631..07c863f9099 100644 --- a/clang/test/OpenMP/master_messages.cpp +++ b/clang/test/OpenMP/master_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized int foo(); diff --git a/clang/test/OpenMP/ordered_messages.cpp b/clang/test/OpenMP/ordered_messages.cpp index 294e7455af3..6404ec8bf91 100644 --- a/clang/test/OpenMP/ordered_messages.cpp +++ b/clang/test/OpenMP/ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized int foo(); diff --git a/clang/test/OpenMP/parallel_copyin_messages.cpp b/clang/test/OpenMP/parallel_copyin_messages.cpp index 81a507addf1..4064b020228 100644 --- a/clang/test/OpenMP/parallel_copyin_messages.cpp +++ b/clang/test/OpenMP/parallel_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_default_messages.cpp b/clang/test/OpenMP/parallel_default_messages.cpp index 440e91b1038..6ae0ba51ac3 100644 --- a/clang/test/OpenMP/parallel_default_messages.cpp +++ b/clang/test/OpenMP/parallel_default_messages.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_firstprivate_messages.cpp b/clang/test/OpenMP/parallel_firstprivate_messages.cpp index 6c5a41c589c..b0f0c6a8c85 100644 --- a/clang/test/OpenMP/parallel_firstprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -63,7 +63,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; static int m; #pragma omp parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -75,7 +75,7 @@ int main(int argc, char **argv) { #pragma omp parallel firstprivate (argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}} #pragma omp parallel firstprivate (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp parallel firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} - #pragma omp parallel firstprivate (d) + #pragma omp parallel firstprivate (z, d) d = 5; // expected-error {{cannot assign to variable 'd' with const-qualified type}} #pragma omp parallel firstprivate (argv[1]) // expected-error {{expected variable name}} #pragma omp parallel firstprivate(ba) diff --git a/clang/test/OpenMP/parallel_for_collapse_messages.cpp b/clang/test/OpenMP/parallel_for_collapse_messages.cpp index 192fa45c904..d03e1b820e3 100644 --- a/clang/test/OpenMP/parallel_for_collapse_messages.cpp +++ b/clang/test/OpenMP/parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_copyin_messages.cpp b/clang/test/OpenMP/parallel_for_copyin_messages.cpp index 265a1953e06..af13549ecdd 100644 --- a/clang/test/OpenMP/parallel_for_copyin_messages.cpp +++ b/clang/test/OpenMP/parallel_for_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_default_messages.cpp b/clang/test/OpenMP/parallel_for_default_messages.cpp index 8baa2f6c045..b02fa8803a3 100644 --- a/clang/test/OpenMP/parallel_for_default_messages.cpp +++ b/clang/test/OpenMP/parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/parallel_for_firstprivate_messages.cpp index 752d0325e65..28a21a49e60 100644 --- a/clang/test/OpenMP/parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -93,7 +93,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}} diff --git a/clang/test/OpenMP/parallel_for_if_messages.cpp b/clang/test/OpenMP/parallel_for_if_messages.cpp index 1d83d3585d6..32f9ef3a7de 100644 --- a/clang/test/OpenMP/parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for if(argc) + #pragma omp parallel for if(argc/z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -55,7 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i,z; #pragma omp parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -86,7 +86,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for if(parallel : argc) + #pragma omp parallel for if(parallel : z*argc) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for'}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp index 5c782a56377..4a7c346bbf2 100644 --- a/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) @@ -95,7 +95,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp parallel for lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -143,7 +143,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (i = 0; i < argc; ++i) @@ -163,7 +163,7 @@ int main(int argc, char **argv) { #pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for lastprivate(argc) +#pragma omp parallel for lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/parallel_for_linear_messages.cpp b/clang/test/OpenMP/parallel_for_linear_messages.cpp index 0dfdb3d96f3..b10557163b0 100644 --- a/clang/test/OpenMP/parallel_for_linear_messages.cpp +++ b/clang/test/OpenMP/parallel_for_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -120,7 +120,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -140,7 +140,7 @@ int foomain(I argc, C **argv) { #pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for linear(argc : 5) +#pragma omp parallel for linear(argc, z : 5) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}} @@ -205,7 +205,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -225,7 +225,7 @@ int main(int argc, char **argv) { #pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for linear(argc) +#pragma omp parallel for linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/parallel_for_loop_messages.cpp b/clang/test/OpenMP/parallel_for_loop_messages.cpp index 12020c37a57..f1314943b35 100644 --- a/clang/test/OpenMP/parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/parallel_for_messages.cpp b/clang/test/OpenMP/parallel_for_messages.cpp index f5aa6e66472..b53f6fa3196 100644 --- a/clang/test/OpenMP/parallel_for_messages.cpp +++ b/clang/test/OpenMP/parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_misc_messages.c b/clang/test/OpenMP/parallel_for_misc_messages.c index 2d12ba45072..946f6d58cce 100644 --- a/clang/test/OpenMP/parallel_for_misc_messages.c +++ b/clang/test/OpenMP/parallel_for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}} #pragma omp parallel for diff --git a/clang/test/OpenMP/parallel_for_num_threads_messages.cpp b/clang/test/OpenMP/parallel_for_num_threads_messages.cpp index 6f57d6e8f45..e689df8fc7d 100644 --- a/clang/test/OpenMP/parallel_for_num_threads_messages.cpp +++ b/clang/test/OpenMP/parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for num_threads (argc) + #pragma omp parallel for num_threads (argc+z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} + #pragma omp parallel for num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/parallel_for_ordered_messages.cpp b/clang/test/OpenMP/parallel_for_ordered_messages.cpp index 9681d780fb2..027e3b0797d 100644 --- a/clang/test/OpenMP/parallel_for_ordered_messages.cpp +++ b/clang/test/OpenMP/parallel_for_ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_private_messages.cpp b/clang/test/OpenMP/parallel_for_private_messages.cpp index 4591043bbfc..3f742600e1a 100644 --- a/clang/test/OpenMP/parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/parallel_for_proc_bind_messages.cpp b/clang/test/OpenMP/parallel_for_proc_bind_messages.cpp index 0ffff89a8c9..85c6982eef4 100644 --- a/clang/test/OpenMP/parallel_for_proc_bind_messages.cpp +++ b/clang/test/OpenMP/parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_for_reduction_messages.cpp b/clang/test/OpenMP/parallel_for_reduction_messages.cpp index 87a5027f696..80357675171 100644 --- a/clang/test/OpenMP/parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -92,7 +92,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -137,7 +137,7 @@ T tmain(T argc) { #pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -214,7 +214,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -259,7 +259,7 @@ int main(int argc, char **argv) { #pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} diff --git a/clang/test/OpenMP/parallel_for_schedule_messages.cpp b/clang/test/OpenMP/parallel_for_schedule_messages.cpp index dfdd36dddde..04fdad17328 100644 --- a/clang/test/OpenMP/parallel_for_schedule_messages.cpp +++ b/clang/test/OpenMP/parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -35,7 +36,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -56,6 +57,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -74,7 +76,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/parallel_for_simd_aligned_messages.cpp index 75f4adb00b2..76c64de3fec 100644 --- a/clang/test/OpenMP/parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp index 39d01b8c2f6..4b2c8b577b7 100644 --- a/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_simd_copyin_messages.cpp b/clang/test/OpenMP/parallel_for_simd_copyin_messages.cpp index 6b492b13f7b..5214fb91a9f 100644 --- a/clang/test/OpenMP/parallel_for_simd_copyin_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_simd_default_messages.cpp b/clang/test/OpenMP/parallel_for_simd_default_messages.cpp index 7b30e4106a8..570ee14bbc8 100644 --- a/clang/test/OpenMP/parallel_for_simd_default_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp index ef3743bc79f..2cd9c065c63 100644 --- a/clang/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for simd firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp parallel for simd firstprivate(h, z) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear(i) @@ -154,7 +154,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -174,7 +174,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd firstprivate(argc) +#pragma omp parallel for simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/parallel_for_simd_if_messages.cpp b/clang/test/OpenMP/parallel_for_simd_if_messages.cpp index 08f8b466ed3..aa1e302d042 100644 --- a/clang/test/OpenMP/parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd if(argc) + #pragma omp parallel for simd if(argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -55,7 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -86,7 +86,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd if(parallel : argc) + #pragma omp parallel for simd if(parallel : argc / z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for simd'}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp index 45cc26b074b..e47a6090b62 100644 --- a/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -68,7 +68,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) @@ -100,7 +100,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp parallel for simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} @@ -145,7 +145,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (i = 0; i < argc; ++i) @@ -180,7 +180,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(ba) +#pragma omp parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/clang/test/OpenMP/parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/parallel_for_simd_linear_messages.cpp index cf207f021a4..5d6da8c9408 100644 --- a/clang/test/OpenMP/parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -104,7 +104,7 @@ S3 h; template<class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -132,7 +132,7 @@ template<class I, class C> int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp parallel for simd linear(i) + #pragma omp parallel for simd linear(i, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel { @@ -168,7 +168,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -182,13 +182,13 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp parallel for simd linear (argc) + #pragma omp parallel for simd linear (argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp parallel for simd linear (a, b) + #pragma omp parallel for simd linear (a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; diff --git a/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp index ba54cb2c09a..d606f07e5bb 100644 --- a/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/parallel_for_simd_messages.cpp b/clang/test/OpenMP/parallel_for_simd_messages.cpp index 77b9b0851e8..e0e77841319 100644 --- a/clang/test/OpenMP/parallel_for_simd_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_simd_misc_messages.c b/clang/test/OpenMP/parallel_for_simd_misc_messages.c index d3565bfa4f1..2dd64d3155f 100644 --- a/clang/test/OpenMP/parallel_for_simd_misc_messages.c +++ b/clang/test/OpenMP/parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}} #pragma omp parallel for simd diff --git a/clang/test/OpenMP/parallel_for_simd_num_threads_messages.cpp b/clang/test/OpenMP/parallel_for_simd_num_threads_messages.cpp index 06460c397de..f79ec4f68f4 100644 --- a/clang/test/OpenMP/parallel_for_simd_num_threads_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd num_threads (argc) + #pragma omp parallel for simd num_threads (argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} + #pragma omp parallel for simd num_threads (argc * z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/parallel_for_simd_private_messages.cpp index c5f853fc5de..40ea8ecdc15 100644 --- a/clang/test/OpenMP/parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -97,7 +97,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -123,7 +123,7 @@ int foomain(I argc, C **argv) { #pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd private(a, b) // expected-error {{private variable with incomplete type 'S1'}} +#pragma omp parallel for simd private(z, a, b) // expected-error {{private variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd private(argv[1]) // expected-error {{expected variable name}} @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -192,7 +192,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd private(argc) +#pragma omp parallel for simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp b/clang/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp index 26cc729964d..5e7a22e4172 100644 --- a/clang/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp index 5586a8b8640..4c2e5978b28 100644 --- a/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -131,7 +131,7 @@ T tmain(T argc) { #pragma omp parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -208,7 +208,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -247,7 +247,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(&& : argc) +#pragma omp parallel for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp index 939a1dafb3d..b0951de6623 100644 --- a/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_for_simd_schedule_messages.cpp b/clang/test/OpenMP/parallel_for_simd_schedule_messages.cpp index 29e46a7a0c7..5a1e9b9139c 100644 --- a/clang/test/OpenMP/parallel_for_simd_schedule_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T k; #pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -46,7 +47,7 @@ T tmain(T argc, S **argv) { // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} #pragma omp parallel for simd schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp parallel for simd schedule (dynamic, 1) + #pragma omp parallel for simd schedule (dynamic, k) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}} for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int k; #pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -68,7 +70,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp parallel for simd schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}} + #pragma omp parallel for simd schedule (guided, k // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; diff --git a/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp index 8cf196bf719..29a340e52f2 100644 --- a/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_if_messages.cpp b/clang/test/OpenMP/parallel_if_messages.cpp index d0a4c6d1108..7f802a9e423 100644 --- a/clang/test/OpenMP/parallel_if_messages.cpp +++ b/clang/test/OpenMP/parallel_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,12 +13,13 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp parallel if // expected-error {{expected '(' after 'if'}} #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if () // expected-error {{expected expression}} #pragma omp parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}} - #pragma omp parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp parallel if (argc > 0 ? argv[1] : argv[2] + z) #pragma omp parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause}} #pragma omp parallel if (S) // expected-error {{'S' does not refer to a value}} #pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -37,6 +38,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp parallel if // expected-error {{expected '(' after 'if'}} #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if () // expected-error {{expected expression}} @@ -52,7 +54,7 @@ int main(int argc, char **argv) { #pragma omp parallel if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if(parallel : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp parallel if(parallel : argc) + #pragma omp parallel if(parallel : argc>> z) #pragma omp parallel if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel'}} #pragma omp parallel if(parallel : argc) if (parallel:argc) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause with 'parallel' name modifier}} #pragma omp parallel if(parallel : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/clang/test/OpenMP/parallel_messages.cpp b/clang/test/OpenMP/parallel_messages.cpp index c32e8c895a0..6012487562e 100644 --- a/clang/test/OpenMP/parallel_messages.cpp +++ b/clang/test/OpenMP/parallel_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_num_threads_messages.cpp b/clang/test/OpenMP/parallel_num_threads_messages.cpp index 310e7ccfa4e..0e50c7e1eb2 100644 --- a/clang/test/OpenMP/parallel_num_threads_messages.cpp +++ b/clang/test/OpenMP/parallel_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -15,6 +15,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}} #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel num_threads () // expected-error {{expected expression}} @@ -24,7 +25,7 @@ T tmain(T argc, S **argv) { #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} #pragma omp parallel num_threads (S) // expected-error {{'S' does not refer to a value}} #pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} - #pragma omp parallel num_threads (argc) + #pragma omp parallel num_threads (argc+z) #pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} #pragma omp parallel redef_num_threads (argc, argc) foo(); @@ -33,11 +34,12 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}} #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel num_threads () // expected-error {{expected expression}} #pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}} + #pragma omp parallel num_threads (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}} #pragma omp parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} #pragma omp parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/parallel_private_messages.cpp b/clang/test/OpenMP/parallel_private_messages.cpp index e2104937418..08b4175a1ee 100644 --- a/clang/test/OpenMP/parallel_private_messages.cpp +++ b/clang/test/OpenMP/parallel_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -57,7 +57,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g[] = {5, 6}; - int i; + int i, z; int &j = i; #pragma omp parallel private // expected-error {{expected '(' after 'private'}} #pragma omp parallel private ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -79,7 +79,7 @@ int main(int argc, char **argv) { foo(); #pragma omp parallel firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}} foo(); - #pragma omp parallel private(i) + #pragma omp parallel private(i, z) #pragma omp parallel private(j) foo(); #pragma omp parallel firstprivate(i) diff --git a/clang/test/OpenMP/parallel_proc_bind_messages.cpp b/clang/test/OpenMP/parallel_proc_bind_messages.cpp index 91be0f1a8d8..5639bd184e0 100644 --- a/clang/test/OpenMP/parallel_proc_bind_messages.cpp +++ b/clang/test/OpenMP/parallel_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_reduction_messages.cpp b/clang/test/OpenMP/parallel_reduction_messages.cpp index 2e90b63e0db..cb0ba7cf712 100644 --- a/clang/test/OpenMP/parallel_reduction_messages.cpp +++ b/clang/test/OpenMP/parallel_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -85,7 +85,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -117,7 +117,7 @@ T tmain(T argc) { foo(); #pragma omp parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -180,7 +180,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -208,7 +208,7 @@ int main(int argc, char **argv) { foo(); #pragma omp parallel reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp parallel reduction(&& : argc) +#pragma omp parallel reduction(&& : argc, z) foo(); #pragma omp parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/clang/test/OpenMP/parallel_sections_copyin_messages.cpp b/clang/test/OpenMP/parallel_sections_copyin_messages.cpp index da0ef5cb1e0..725e6ee932e 100644 --- a/clang/test/OpenMP/parallel_sections_copyin_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_sections_default_messages.cpp b/clang/test/OpenMP/parallel_sections_default_messages.cpp index 3d2e74933f1..d6a10fe56b3 100644 --- a/clang/test/OpenMP/parallel_sections_default_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp b/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp index c161e6f747b..f07a7206958 100644 --- a/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -101,7 +101,7 @@ int foomain(int argc, char **argv) { { foo(); } -#pragma omp parallel sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp parallel sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} { foo(); } @@ -173,7 +173,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -199,7 +199,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections firstprivate(argc) +#pragma omp parallel sections firstprivate(argc, z) { foo(); } diff --git a/clang/test/OpenMP/parallel_sections_if_messages.cpp b/clang/test/OpenMP/parallel_sections_if_messages.cpp index b03ed355165..8d36b6d5d30 100644 --- a/clang/test/OpenMP/parallel_sections_if_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}} { foo(); @@ -53,7 +54,7 @@ int tmain(T argc, S **argv) { { foo(); } - #pragma omp parallel sections if(argc) + #pragma omp parallel sections if(argc + z) { foo(); } @@ -86,6 +87,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}} { foo(); @@ -106,7 +108,7 @@ int main(int argc, char **argv) { { foo(); } - #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2]) + #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2] + z) { foo(); } diff --git a/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp index b259b8a19e5..5f3a2e7244b 100644 --- a/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/parallel_sections_messages.cpp b/clang/test/OpenMP/parallel_sections_messages.cpp index 81f0c517cde..ab4c34a6b2c 100644 --- a/clang/test/OpenMP/parallel_sections_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/parallel_sections_misc_messages.c b/clang/test/OpenMP/parallel_sections_misc_messages.c index 780837a15f9..0264cd6dd64 100644 --- a/clang/test/OpenMP/parallel_sections_misc_messages.c +++ b/clang/test/OpenMP/parallel_sections_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_sections_num_threads_messages.cpp b/clang/test/OpenMP/parallel_sections_num_threads_messages.cpp index 42bdee25e46..31434e4757a 100644 --- a/clang/test/OpenMP/parallel_sections_num_threads_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}} {foo();} #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -31,7 +32,7 @@ T tmain(T argc, S **argv) { {foo();} #pragma omp parallel sections num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} {foo();} - #pragma omp parallel sections num_threads (argc) + #pragma omp parallel sections num_threads (argc + z) {foo();} #pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} {foo();} @@ -40,6 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}} {foo();} #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -48,7 +50,7 @@ int main(int argc, char **argv) { {foo();} #pragma omp parallel sections num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} {foo();} - #pragma omp parallel sections num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}} + #pragma omp parallel sections num_threads (argc / z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}} {foo();} #pragma omp parallel sections num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} {foo();} diff --git a/clang/test/OpenMP/parallel_sections_private_messages.cpp b/clang/test/OpenMP/parallel_sections_private_messages.cpp index 2161df33d8d..7e9a6e41b73 100644 --- a/clang/test/OpenMP/parallel_sections_private_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -109,7 +109,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}} { @@ -151,7 +151,7 @@ int foomain(I argc, C **argv) { { foo(); } -#pragma omp parallel sections private(e, g) +#pragma omp parallel sections private(e, g, z) { foo(); } @@ -199,7 +199,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}} { @@ -225,7 +225,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections private(argc) +#pragma omp parallel sections private(argc, z) { foo(); } diff --git a/clang/test/OpenMP/parallel_sections_proc_bind_messages.cpp b/clang/test/OpenMP/parallel_sections_proc_bind_messages.cpp index bb173b61e52..81e9c75e899 100644 --- a/clang/test/OpenMP/parallel_sections_proc_bind_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/parallel_sections_reduction_messages.cpp b/clang/test/OpenMP/parallel_sections_reduction_messages.cpp index ac205cd076f..72aa9d4dde9 100644 --- a/clang/test/OpenMP/parallel_sections_reduction_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -87,7 +87,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -145,7 +145,7 @@ T tmain(T argc) { { foo(); } -#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel sections reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} { foo(); } @@ -240,7 +240,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -342,7 +342,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp parallel sections reduction(+ : o, z) // expected-error {{no viable overloaded '='}} { foo(); } diff --git a/clang/test/OpenMP/parallel_sections_shared_messages.cpp b/clang/test/OpenMP/parallel_sections_shared_messages.cpp index 1ab923c3308..554c6e2286c 100644 --- a/clang/test/OpenMP/parallel_sections_shared_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -63,7 +63,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp parallel sections shared // expected-error {{expected '(' after 'shared'}} { foo(); } @@ -81,7 +81,7 @@ int main(int argc, char **argv) { { foo(); } #pragma omp parallel sections shared(S1) // expected-error {{'S1' does not refer to a value}} { foo(); } -#pragma omp parallel sections shared(a, b, c, d, f) +#pragma omp parallel sections shared(a, b, c, d, f, k) { foo(); } #pragma omp parallel sections shared(argv[1]) // expected-error {{expected variable name}} { foo(); } diff --git a/clang/test/OpenMP/parallel_shared_messages.cpp b/clang/test/OpenMP/parallel_shared_messages.cpp index 915b6a2cfc6..0869f169133 100644 --- a/clang/test/OpenMP/parallel_shared_messages.cpp +++ b/clang/test/OpenMP/parallel_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp parallel shared // expected-error {{expected '(' after 'shared'}} #pragma omp parallel shared ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -69,7 +69,7 @@ int main(int argc, char **argv) { #pragma omp parallel shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} #pragma omp parallel shared (argc) #pragma omp parallel shared (S1) // expected-error {{'S1' does not refer to a value}} - #pragma omp parallel shared (a, b, c, d, f) + #pragma omp parallel shared (a, b, c, d, f, k) #pragma omp parallel shared (argv[1]) // expected-error {{expected variable name}} #pragma omp parallel shared(ba) #pragma omp parallel shared(ca) diff --git a/clang/test/OpenMP/requires_messages.cpp b/clang/test/OpenMP/requires_messages.cpp index edc98f1a14e..72a6c502297 100644 --- a/clang/test/OpenMP/requires_messages.cpp +++ b/clang/test/OpenMP/requires_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized int a; #pragma omp requires unified_address allocate(a) // expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note{{unified_address clause previously used here}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp requires'}} diff --git a/clang/test/OpenMP/sections_firstprivate_messages.cpp b/clang/test/OpenMP/sections_firstprivate_messages.cpp index e2d9de3c316..1b595f483c4 100644 --- a/clang/test/OpenMP/sections_firstprivate_messages.cpp +++ b/clang/test/OpenMP/sections_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -110,7 +110,7 @@ int foomain(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} { foo(); } @@ -188,7 +188,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -221,7 +221,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(argc) +#pragma omp sections firstprivate(argc, z) { foo(); } diff --git a/clang/test/OpenMP/sections_lastprivate_messages.cpp b/clang/test/OpenMP/sections_lastprivate_messages.cpp index f7e0d1acf0e..37a0100bf65 100644 --- a/clang/test/OpenMP/sections_lastprivate_messages.cpp +++ b/clang/test/OpenMP/sections_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -68,7 +68,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -111,7 +111,7 @@ int foomain(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp sections lastprivate(a, b, k) // expected-error {{lastprivate variable with incomplete type 'S1'}} { foo(); } @@ -174,7 +174,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -232,7 +232,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(ba) +#pragma omp sections lastprivate(ba, k) { foo(); } diff --git a/clang/test/OpenMP/sections_misc_messages.c b/clang/test/OpenMP/sections_misc_messages.c index ba030859e57..8d8dab86a3c 100644 --- a/clang/test/OpenMP/sections_misc_messages.c +++ b/clang/test/OpenMP/sections_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/sections_private_messages.cpp b/clang/test/OpenMP/sections_private_messages.cpp index 3548590b0f4..e032c7a5ece 100644 --- a/clang/test/OpenMP/sections_private_messages.cpp +++ b/clang/test/OpenMP/sections_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/sections_reduction_messages.cpp b/clang/test/OpenMP/sections_reduction_messages.cpp index e0b285cbaf4..8b1c1f1abbc 100644 --- a/clang/test/OpenMP/sections_reduction_messages.cpp +++ b/clang/test/OpenMP/sections_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -210,7 +210,7 @@ T tmain(T argc) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} +#pragma omp sections reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}} { foo(); } @@ -268,7 +268,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -330,7 +330,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections reduction(&& : argc) +#pragma omp sections reduction(&& : argc, z) { foo(); } diff --git a/clang/test/OpenMP/simd_aligned_messages.cpp b/clang/test/OpenMP/simd_aligned_messages.cpp index 7621d7de096..44679b3373a 100644 --- a/clang/test/OpenMP/simd_aligned_messages.cpp +++ b/clang/test/OpenMP/simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/simd_collapse_messages.cpp b/clang/test/OpenMP/simd_collapse_messages.cpp index 3e980d94927..978ae29fcad 100644 --- a/clang/test/OpenMP/simd_collapse_messages.cpp +++ b/clang/test/OpenMP/simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/simd_lastprivate_messages.cpp b/clang/test/OpenMP/simd_lastprivate_messages.cpp index 9469c53b746..e9171af2eb7 100644 --- a/clang/test/OpenMP/simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/simd_linear_messages.cpp b/clang/test/OpenMP/simd_linear_messages.cpp index fa2690616cd..964439277b6 100644 --- a/clang/test/OpenMP/simd_linear_messages.cpp +++ b/clang/test/OpenMP/simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -104,7 +104,7 @@ S3 h; template<class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -140,7 +140,7 @@ template<class I, class C> int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} + #pragma omp simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}} for (int k = 0; k < argc; ++k) ++k; @@ -195,7 +195,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}} for (int k = 0; k < argc; ++k) ++k; @@ -223,7 +223,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp simd linear(a, b) + #pragma omp simd linear(a, b, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; diff --git a/clang/test/OpenMP/simd_loop_messages.cpp b/clang/test/OpenMP/simd_loop_messages.cpp index 975cd7f90f7..7a3bdedac96 100644 --- a/clang/test/OpenMP/simd_loop_messages.cpp +++ b/clang/test/OpenMP/simd_loop_messages.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized static int sii; // expected-note@+1 {{defined as threadprivate or thread local}} diff --git a/clang/test/OpenMP/simd_misc_messages.c b/clang/test/OpenMP/simd_misc_messages.c index 75b8ce0596c..1fbb6fa263c 100644 --- a/clang/test/OpenMP/simd_misc_messages.c +++ b/clang/test/OpenMP/simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}} #pragma omp simd diff --git a/clang/test/OpenMP/simd_private_messages.cpp b/clang/test/OpenMP/simd_private_messages.cpp index 99f76ceed54..12927b07d19 100644 --- a/clang/test/OpenMP/simd_private_messages.cpp +++ b/clang/test/OpenMP/simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/simd_reduction_messages.cpp b/clang/test/OpenMP/simd_reduction_messages.cpp index f204ae16084..8e2503331b6 100644 --- a/clang/test/OpenMP/simd_reduction_messages.cpp +++ b/clang/test/OpenMP/simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -131,7 +131,7 @@ T tmain(T argc) { #pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -211,7 +211,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -250,7 +250,7 @@ int main(int argc, char **argv) { #pragma omp simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(&& : argc) +#pragma omp simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/simd_safelen_messages.cpp b/clang/test/OpenMP/simd_safelen_messages.cpp index f40873aeeae..7a557781a75 100644 --- a/clang/test/OpenMP/simd_safelen_messages.cpp +++ b/clang/test/OpenMP/simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/simd_simdlen_messages.cpp b/clang/test/OpenMP/simd_simdlen_messages.cpp index 27ab4acf770..0b7b800c26a 100644 --- a/clang/test/OpenMP/simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/single_copyprivate_messages.cpp b/clang/test/OpenMP/single_copyprivate_messages.cpp index bb18568d0f2..1dc508b01bd 100644 --- a/clang/test/OpenMP/single_copyprivate_messages.cpp +++ b/clang/test/OpenMP/single_copyprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -45,8 +45,10 @@ S5 m(4); template <class T, class C> T tmain(T argc, C **argv) { - T i; + T i, z; static T TA; +#pragma omp single copyprivate(z) + ; #pragma omp parallel #pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}} #pragma omp parallel @@ -121,7 +123,7 @@ using A::x; } int main(int argc, char **argv) { - int i; + int i, z; static int intA; #pragma omp parallel #pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}} @@ -146,9 +148,9 @@ int main(int argc, char **argv) { #pragma omp parallel #pragma omp single copyprivate(m) // expected-error {{'operator=' is a private member of 'S5'}} foo(); -#pragma omp parallel private(i) +#pragma omp parallel private(i, z) { -#pragma omp single copyprivate(i) +#pragma omp single copyprivate(i, z) foo(); } #pragma omp parallel shared(i) // expected-note {{defined as shared}} diff --git a/clang/test/OpenMP/single_firstprivate_messages.cpp b/clang/test/OpenMP/single_firstprivate_messages.cpp index cff4b9013bf..d97be2ab9be 100644 --- a/clang/test/OpenMP/single_firstprivate_messages.cpp +++ b/clang/test/OpenMP/single_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -94,7 +94,7 @@ int foomain(int argc, char **argv) { #pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}} foo(); #pragma omp parallel -#pragma omp single firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp single firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} foo(); #pragma omp parallel #pragma omp single firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -150,7 +150,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -171,7 +171,7 @@ int main(int argc, char **argv) { #pragma omp single firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} foo(); #pragma omp parallel -#pragma omp single firstprivate(argc) +#pragma omp single firstprivate(argc, z) foo(); #pragma omp parallel #pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/single_misc_messages.c b/clang/test/OpenMP/single_misc_messages.c index b8264198079..0d4ab5a77b5 100644 --- a/clang/test/OpenMP/single_misc_messages.c +++ b/clang/test/OpenMP/single_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/single_private_messages.cpp b/clang/test/OpenMP/single_private_messages.cpp index 6ae2a385a38..e809f0732a1 100644 --- a/clang/test/OpenMP/single_private_messages.cpp +++ b/clang/test/OpenMP/single_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/target_data_device_messages.cpp b/clang/test/OpenMP/target_data_device_messages.cpp index 51c809a8653..873402d372d 100644 --- a/clang/test/OpenMP/target_data_device_messages.cpp +++ b/clang/test/OpenMP/target_data_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int a; + int a, z; #pragma omp target data map(to: a) device // expected-error {{expected '(' after 'device'}} #pragma omp target data map(to: a) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) device () // expected-error {{expected expression}} #pragma omp target data map(to: a) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}} #pragma omp target data map(to: a) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} - #pragma omp target data map(to: a) device (argc + argc) + #pragma omp target data map(to: a) device (argc + argc + z) #pragma omp target data map(to: a) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}} #pragma omp target data map(to: a) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target data map(to: a) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} diff --git a/clang/test/OpenMP/target_data_if_messages.cpp b/clang/test/OpenMP/target_data_if_messages.cpp index ae68d252a8e..c6f9b4b34ee 100644 --- a/clang/test/OpenMP/target_data_if_messages.cpp +++ b/clang/test/OpenMP/target_data_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int a; + int a, z; #pragma omp target data map(to: a) if // expected-error {{expected '(' after 'if'}} #pragma omp target data map(to: a) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) if () // expected-error {{expected expression}} #pragma omp target data map(to: a) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}} #pragma omp target data map(to: a) if (argc > 0 ? argv[1] : argv[2]) - #pragma omp target data map(to: a) if (argc + argc) + #pragma omp target data map(to: a) if (argc + argc + z) #pragma omp target data map(to: a) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'if' clause}} #pragma omp target data map(to: a) if (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target data map(to: a) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/target_data_messages.c b/clang/test/OpenMP/target_data_messages.c index 936e3eaa64c..9497ddba026 100644 --- a/clang/test/OpenMP/target_data_messages.c +++ b/clang/test/OpenMP/target_data_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_data_use_device_ptr_messages.cpp b/clang/test/OpenMP/target_data_use_device_ptr_messages.cpp index 87f23e2de77..6ce6f9db7d2 100644 --- a/clang/test/OpenMP/target_data_use_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_data_use_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_defaultmap_messages.cpp b/clang/test/OpenMP/target_defaultmap_messages.cpp index 27079c30281..0676753d6a6 100644 --- a/clang/test/OpenMP/target_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_depend_messages.cpp b/clang/test/OpenMP/target_depend_messages.cpp index d6990805450..a7ac1760e6b 100644 --- a/clang/test/OpenMP/target_depend_messages.cpp +++ b/clang/test/OpenMP/target_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_device_messages.cpp b/clang/test/OpenMP/target_device_messages.cpp index 8cf19b25970..8a583e9f3bd 100644 --- a/clang/test/OpenMP/target_device_messages.cpp +++ b/clang/test/OpenMP/target_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,6 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { + int z; #pragma omp target device // expected-error {{expected '(' after 'device'}} foo(); #pragma omp target device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -20,7 +21,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}} + #pragma omp target device (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}} foo(); #pragma omp target device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); diff --git a/clang/test/OpenMP/target_enter_data_depend_messages.cpp b/clang/test/OpenMP/target_enter_data_depend_messages.cpp index c9a0d7ab3c5..49dddfcc7cb 100644 --- a/clang/test/OpenMP/target_enter_data_depend_messages.cpp +++ b/clang/test/OpenMP/target_enter_data_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_enter_data_device_messages.cpp b/clang/test/OpenMP/target_enter_data_device_messages.cpp index de8405b4a62..a233a47152d 100644 --- a/clang/test/OpenMP/target_enter_data_device_messages.cpp +++ b/clang/test/OpenMP/target_enter_data_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target enter data map(to: i) device // expected-error {{expected '(' after 'device'}} #pragma omp target enter data map(to: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) device () // expected-error {{expected expression}} #pragma omp target enter data map(to: i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target enter data' are ignored}} #pragma omp target enter data map(to: i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} - #pragma omp target enter data map(to: i) device (argc + argc) + #pragma omp target enter data map(to: i) device (argc +z + argc ) #pragma omp target enter data map(to: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'device' clause}} #pragma omp target enter data map(to: i) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target enter data map(to: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} diff --git a/clang/test/OpenMP/target_enter_data_if_messages.cpp b/clang/test/OpenMP/target_enter_data_if_messages.cpp index 26404a5d97a..5123d607dc6 100644 --- a/clang/test/OpenMP/target_enter_data_if_messages.cpp +++ b/clang/test/OpenMP/target_enter_data_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target enter data map(to: i) if // expected-error {{expected '(' after 'if'}} #pragma omp target enter data map(to: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) if () // expected-error {{expected expression}} @@ -27,7 +27,7 @@ int main(int argc, char **argv) { #pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) if(target enter data : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp target enter data map(to: i) if(target enter data : argc) + #pragma omp target enter data map(to: i) if(target enter data : argc + z) #pragma omp target enter data map(to: i) if(target enter data : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target enter data'}} #pragma omp target enter data map(to: i) if(target enter data : argc) if (target enter data:argc) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'if' clause with 'target enter data' name modifier}} #pragma omp target enter data map(to: i) if(target enter data : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/clang/test/OpenMP/target_enter_data_map_messages.c b/clang/test/OpenMP/target_enter_data_map_messages.c index 7d03fcfa9a3..cd082c63f85 100644 --- a/clang/test/OpenMP/target_enter_data_map_messages.c +++ b/clang/test/OpenMP/target_enter_data_map_messages.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized int main(int argc, char **argv) { diff --git a/clang/test/OpenMP/target_enter_data_nowait_messages.cpp b/clang/test/OpenMP/target_enter_data_nowait_messages.cpp index 6f59c5ceb7b..3f5dde00b81 100644 --- a/clang/test/OpenMP/target_enter_data_nowait_messages.cpp +++ b/clang/test/OpenMP/target_enter_data_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized int main(int argc, char **argv) { int i; diff --git a/clang/test/OpenMP/target_exit_data_depend_messages.cpp b/clang/test/OpenMP/target_exit_data_depend_messages.cpp index 07ff02fad48..8a2b07e55c5 100644 --- a/clang/test/OpenMP/target_exit_data_depend_messages.cpp +++ b/clang/test/OpenMP/target_exit_data_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_exit_data_device_messages.cpp b/clang/test/OpenMP/target_exit_data_device_messages.cpp index ad27e8a50dd..035bf6f76a6 100644 --- a/clang/test/OpenMP/target_exit_data_device_messages.cpp +++ b/clang/test/OpenMP/target_exit_data_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target exit data map(from: i) device // expected-error {{expected '(' after 'device'}} #pragma omp target exit data map(from: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target exit data map(from: i) device () // expected-error {{expected expression}} @@ -23,7 +23,7 @@ int main(int argc, char **argv) { #pragma omp target exit data map(from: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'device' clause}} #pragma omp target exit data map(from: i) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target exit data map(from: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} - #pragma omp target exit data map(from: i) device (-10u) + #pragma omp target exit data map(from: i) device (-10u + z) #pragma omp target exit data map(from: i) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}} foo(); diff --git a/clang/test/OpenMP/target_exit_data_if_messages.cpp b/clang/test/OpenMP/target_exit_data_if_messages.cpp index 9341fe81794..c45b32ff3fe 100644 --- a/clang/test/OpenMP/target_exit_data_if_messages.cpp +++ b/clang/test/OpenMP/target_exit_data_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target exit data map(from: i) if // expected-error {{expected '(' after 'if'}} #pragma omp target exit data map(from: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target exit data map(from: i) if () // expected-error {{expected expression}} #pragma omp target exit data map(from: i) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target exit data map(from: i) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}} #pragma omp target exit data map(from: i) if (argc > 0 ? argv[1] : argv[2]) - #pragma omp target exit data map(from: i) if (argc + argc) + #pragma omp target exit data map(from: i) if (argc + argc + z) #pragma omp target exit data map(from: i) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'if' clause}} #pragma omp target exit data map(from: i) if (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target exit data map(from: i) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/target_exit_data_map_messages.c b/clang/test/OpenMP/target_exit_data_map_messages.c index 4a2df448d3e..f90c0d4ad66 100644 --- a/clang/test/OpenMP/target_exit_data_map_messages.c +++ b/clang/test/OpenMP/target_exit_data_map_messages.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized int main(int argc, char **argv) { diff --git a/clang/test/OpenMP/target_exit_data_nowait_messages.cpp b/clang/test/OpenMP/target_exit_data_nowait_messages.cpp index 02eded5a66d..307e2c34b27 100644 --- a/clang/test/OpenMP/target_exit_data_nowait_messages.cpp +++ b/clang/test/OpenMP/target_exit_data_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized int main(int argc, char **argv) { int i; diff --git a/clang/test/OpenMP/target_firstprivate_messages.cpp b/clang/test/OpenMP/target_firstprivate_messages.cpp index 248751f7898..d96516aebe7 100644 --- a/clang/test/OpenMP/target_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -99,7 +99,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}} {} @@ -131,8 +131,8 @@ int foomain(I argc, C **argv) { int v = 0; int i; } -#pragma omp parallel shared(i) -#pragma omp parallel firstprivate(i) +#pragma omp parallel shared(i, z) +#pragma omp parallel firstprivate(i, z) #pragma omp target firstprivate(j) {} #pragma omp target firstprivate(i) @@ -159,7 +159,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}} {} @@ -173,7 +173,7 @@ int main(int argc, char **argv) { {} #pragma omp target firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} {} -#pragma omp target firstprivate(argc) +#pragma omp target firstprivate(argc, z) {} #pragma omp target firstprivate(S1) // expected-error {{'S1' does not refer to a value}} {} diff --git a/clang/test/OpenMP/target_if_messages.cpp b/clang/test/OpenMP/target_if_messages.cpp index 982fd4b0c02..e6b667f2cff 100644 --- a/clang/test/OpenMP/target_if_messages.cpp +++ b/clang/test/OpenMP/target_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp target if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -33,7 +34,7 @@ int tmain(T argc, S **argv) { foo(); #pragma omp target if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target if(argc) + #pragma omp target if(argc+z) foo(); #pragma omp target if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); @@ -52,6 +53,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp target if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -80,7 +82,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target if(target : argc) + #pragma omp target if(target : argc/z) foo(); #pragma omp target if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target'}} foo(); diff --git a/clang/test/OpenMP/target_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_is_device_ptr_messages.cpp index 6f218e20f98..92297438d52 100644 --- a/clang/test/OpenMP/target_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; @@ -40,7 +40,7 @@ struct SA { #pragma omp target is_device_ptr(aa) // OK {} #pragma omp target is_device_ptr(raa) // OK - {} + {} #pragma omp target is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}} {} #pragma omp target is_device_ptr(g) // OK diff --git a/clang/test/OpenMP/target_map_messages.cpp b/clang/test/OpenMP/target_map_messages.cpp index 04e201d1362..15f7b4fe072 100644 --- a/clang/test/OpenMP/target_map_messages.cpp +++ b/clang/test/OpenMP/target_map_messages.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized #ifdef CCODE void foo(int arg) { const int n = 0; diff --git a/clang/test/OpenMP/target_nowait_messages.cpp b/clang/test/OpenMP/target_nowait_messages.cpp index 1f982dd6740..6b8a1f4d0ac 100644 --- a/clang/test/OpenMP/target_nowait_messages.cpp +++ b/clang/test/OpenMP/target_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_default_messages.cpp b/clang/test/OpenMP/target_parallel_default_messages.cpp index 0aab663b0b9..0691cdf37e4 100644 --- a/clang/test/OpenMP/target_parallel_default_messages.cpp +++ b/clang/test/OpenMP/target_parallel_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_parallel_defaultmap_messages.cpp b/clang/test/OpenMP/target_parallel_defaultmap_messages.cpp index 33078a2ea7e..71a4d8a0ea5 100644 --- a/clang/test/OpenMP/target_parallel_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_parallel_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_depend_messages.cpp b/clang/test/OpenMP/target_parallel_depend_messages.cpp index 15e22134b3e..61557bd2aaf 100644 --- a/clang/test/OpenMP/target_parallel_depend_messages.cpp +++ b/clang/test/OpenMP/target_parallel_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_device_messages.cpp b/clang/test/OpenMP/target_parallel_device_messages.cpp index cc252537531..9d5e4ed5567 100644 --- a/clang/test/OpenMP/target_parallel_device_messages.cpp +++ b/clang/test/OpenMP/target_parallel_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,6 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { + int k; #pragma omp target parallel device // expected-error {{expected '(' after 'device'}} foo(); #pragma omp target parallel device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -26,7 +27,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel device (argc + argc) foo(); - #pragma omp target parallel device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}} + #pragma omp target parallel device (k), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}} foo(); #pragma omp target parallel device (S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/clang/test/OpenMP/target_parallel_firstprivate_messages.cpp b/clang/test/OpenMP/target_parallel_firstprivate_messages.cpp index d6c1bb24961..075beaeac82 100644 --- a/clang/test/OpenMP/target_parallel_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -72,7 +72,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; static int m; #pragma omp target parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -97,7 +97,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel firstprivate(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel' directive}} foo(); - #pragma omp target parallel firstprivate(ca) + #pragma omp target parallel firstprivate(ca, z) foo(); #pragma omp target parallel firstprivate(da) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp index 2e194ffbd08..98700b87e5e 100644 --- a/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_default_messages.cpp b/clang/test/OpenMP/target_parallel_for_default_messages.cpp index 87f6a5bde16..fc6ba43138d 100644 --- a/clang/test/OpenMP/target_parallel_for_default_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_parallel_for_defaultmap_messages.cpp b/clang/test/OpenMP/target_parallel_for_defaultmap_messages.cpp index 9f97b60ff41..bdcc7684e4f 100644 --- a/clang/test/OpenMP/target_parallel_for_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_depend_messages.cpp b/clang/test/OpenMP/target_parallel_for_depend_messages.cpp index 4b255ab0f3a..f6206912fe1 100644 --- a/clang/test/OpenMP/target_parallel_for_depend_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_device_messages.cpp b/clang/test/OpenMP/target_parallel_for_device_messages.cpp index bacf57d99cc..2882c8fc564 100644 --- a/clang/test/OpenMP/target_parallel_for_device_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for device (argc + argc) + #pragma omp target parallel for device (z + argc) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/target_parallel_for_firstprivate_messages.cpp index 286faec9630..dd05d84cb4f 100644 --- a/clang/test/OpenMP/target_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -161,7 +161,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -187,7 +187,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}} diff --git a/clang/test/OpenMP/target_parallel_for_if_messages.cpp b/clang/test/OpenMP/target_parallel_for_if_messages.cpp index 2bc433cf421..445dc1775b0 100644 --- a/clang/test/OpenMP/target_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { int i; + T z; #pragma omp target parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +35,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for if(argc) + #pragma omp target parallel for if(argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -61,7 +62,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +73,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2]) + #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2] - z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'if' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp index 3e675ead2ac..db3aa32edfb 100644 --- a/clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; diff --git a/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp index d01e393baed..906b5923e36 100644 --- a/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_parallel_for_linear_messages.cpp b/clang/test/OpenMP/target_parallel_for_linear_messages.cpp index 3556faa3cab..f5af0ed3c81 100644 --- a/clang/test/OpenMP/target_parallel_for_linear_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -129,7 +129,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -166,7 +166,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for allocate(omp_thread_mem_alloc: e) linear(e, g) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel for' directive}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} +#pragma omp target parallel for linear(z, h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for linear(i) @@ -214,7 +214,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -234,7 +234,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for linear(argc) +#pragma omp target parallel for linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_parallel_for_loop_messages.cpp b/clang/test/OpenMP/target_parallel_for_loop_messages.cpp index 6cc1f80887d..e81d3b2deeb 100644 --- a/clang/test/OpenMP/target_parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_parallel_for_map_messages.cpp b/clang/test/OpenMP/target_parallel_for_map_messages.cpp index 6ef87d442fe..0f02350e29f 100644 --- a/clang/test/OpenMP/target_parallel_for_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_messages.cpp b/clang/test/OpenMP/target_parallel_for_messages.cpp index c454987e255..e78154a5b3d 100644 --- a/clang/test/OpenMP/target_parallel_for_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_misc_messages.c b/clang/test/OpenMP/target_parallel_for_misc_messages.c index 44629e10c0c..f697cf2e6ca 100644 --- a/clang/test/OpenMP/target_parallel_for_misc_messages.c +++ b/clang/test/OpenMP/target_parallel_for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for'}} #pragma omp target parallel for diff --git a/clang/test/OpenMP/target_parallel_for_nowait_messages.cpp b/clang/test/OpenMP/target_parallel_for_nowait_messages.cpp index 2fb875b9de9..2f88c6581d4 100644 --- a/clang/test/OpenMP/target_parallel_for_nowait_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_num_threads_messages.cpp b/clang/test/OpenMP/target_parallel_for_num_threads_messages.cpp index b47c96b82b5..11f0c907804 100644 --- a/clang/test/OpenMP/target_parallel_for_num_threads_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} + #pragma omp target parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} + #pragma omp target parallel for num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp b/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp index 38a977e2935..b703f251f4e 100644 --- a/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_private_messages.cpp b/clang/test/OpenMP/target_parallel_for_private_messages.cpp index 2e3848a6000..4635896a537 100644 --- a/clang/test/OpenMP/target_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -132,7 +132,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for private(a, b) // expected-error {{private variable with incomplete type 'S1'}} +#pragma omp target parallel for private(a, b, z) // expected-error {{private variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for private(argv[1]) // expected-error {{expected variable name}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i ,z; int &j = i; #pragma omp target parallel for private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -198,7 +198,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for private(argc) +#pragma omp target parallel for private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_parallel_for_proc_bind_messages.cpp b/clang/test/OpenMP/target_parallel_for_proc_bind_messages.cpp index 60d5b74fdc0..1adb0b50c2e 100644 --- a/clang/test/OpenMP/target_parallel_for_proc_bind_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp index 3b201f2f2ee..3666a34c952 100644 --- a/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -95,7 +95,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -140,7 +140,7 @@ T tmain(T argc) { #pragma omp target parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -217,7 +217,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(&& : argc) +#pragma omp target parallel for reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_parallel_for_schedule_messages.cpp b/clang/test/OpenMP/target_parallel_for_schedule_messages.cpp index 544ace25e40..287585dfec8 100644 --- a/clang/test/OpenMP/target_parallel_for_schedule_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -46,7 +47,7 @@ T tmain(T argc, S **argv) { // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} #pragma omp target parallel for schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp target parallel for schedule (dynamic, 1) + #pragma omp target parallel for schedule (dynamic, 1 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}} for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +74,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 + z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp index 54a6a9e8de2..b73abba48e2 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp index 24e30b3d3f2..df1b27d2834 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_default_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_default_messages.cpp index 91e745d911c..daa93b9c905 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_default_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp index c019c37c39d..1affed137a1 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_depend_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_depend_messages.cpp index 6410a6c35a0..01e00bf15f3 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_depend_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_device_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_device_messages.cpp index 8d2719571ab..a592cac8d5d 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_device_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd device (argc + argc) + #pragma omp target parallel for simd device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp index 77661a31336..d76fedcce83 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i,z; int &j = i; #pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -161,7 +161,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -187,7 +187,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for simd firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}} 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 fea1ad9778f..b0da8017019 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - int i; + int i, k; #pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd if(argc) + #pragma omp target parallel for simd if(k) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -61,7 +61,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -90,7 +90,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd if(parallel : argc) + #pragma omp target parallel for simd if(parallel : k) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel for simd'}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp index 1079bf3cbb8..47e498a44c6 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp index 750fa3b19a7..04f52f540d4 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -152,7 +152,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (i = 0; i < argc; ++i) @@ -187,7 +187,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd lastprivate(ba) +#pragma omp target parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_linear_messages.cpp index b5664dd3179..829e9eb5669 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -129,7 +129,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -163,7 +163,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for simd linear(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd linear(e, g) +#pragma omp target parallel for simd linear(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} @@ -214,7 +214,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -234,7 +234,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd linear(argc) +#pragma omp target parallel for simd linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_loop_messages.cpp index e2e80186cd8..9bcef91a257 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp index f18cc9a5f81..6f7dc528d84 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y ,z; T to, tofrom, always; const T (&l)[5] = da; @@ -102,7 +102,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(S2::S2sc) for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd map(x) +#pragma omp target parallel for simd map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(to: x) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -216,7 +216,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(to: to) for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd map(to) +#pragma omp target parallel for simd map(to, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(to, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_messages.cpp index 76090e85537..5d07c895b9e 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c b/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c index 8886ddd4a1e..1459d8322a7 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c +++ b/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for simd'}} #pragma omp target parallel for simd diff --git a/clang/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp index 5e1e13168d5..4220bfea3ee 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp index b3323f67728..f7979057ae2 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} + #pragma omp target parallel for simd num_threads (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} + #pragma omp target parallel for simd num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp index 08b9247c1bb..235cbe464f6 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp index 6210323330d..4e0859db325 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for simd private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd private(e, g) +#pragma omp target parallel for simd private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}} S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -198,7 +198,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd private(argc) +#pragma omp target parallel for simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp index 83b4efad15b..ba16e06ea1b 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp index 87be4f1c65e..126518a58d8 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -95,7 +95,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -140,7 +140,7 @@ T tmain(T argc) { #pragma omp target parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -217,7 +217,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(&& : argc) +#pragma omp target parallel for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp index 1121593e5e6..87aaa83a781 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp index 6f26e7aac43..5d118b7c9ac 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -35,7 +36,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +74,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp index 33a6642a8dc..17a931c9f12 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_if_messages.cpp b/clang/test/OpenMP/target_parallel_if_messages.cpp index d59b4ab5074..460e0c8655f 100644 --- a/clang/test/OpenMP/target_parallel_if_messages.cpp +++ b/clang/test/OpenMP/target_parallel_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp target parallel if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -23,7 +24,7 @@ int tmain(T argc, S **argv) { foo(); #pragma omp target parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} foo(); - #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2] + z) foo(); #pragma omp target parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause}} foo(); @@ -60,6 +61,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -88,7 +90,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target parallel if(parallel : argc) + #pragma omp target parallel if(parallel : argc * z) foo(); #pragma omp target parallel if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel'}} foo(); diff --git a/clang/test/OpenMP/target_parallel_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_parallel_is_device_ptr_messages.cpp index b46fd713ff6..9913133734a 100644 --- a/clang/test/OpenMP/target_parallel_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_parallel_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_parallel_map_messages.cpp b/clang/test/OpenMP/target_parallel_map_messages.cpp index 52774aa7410..a7a4e1cd9c2 100644 --- a/clang/test/OpenMP/target_parallel_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -88,7 +88,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel map(l[true:true]) foo(); -#pragma omp target parallel map(x) +#pragma omp target parallel map(x, z) foo(); #pragma omp target parallel map(tofrom: t[:I]) foo(); diff --git a/clang/test/OpenMP/target_parallel_messages.cpp b/clang/test/OpenMP/target_parallel_messages.cpp index a7dfbf91ca5..f664ec12109 100644 --- a/clang/test/OpenMP/target_parallel_messages.cpp +++ b/clang/test/OpenMP/target_parallel_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized // RUN: not %clang_cc1 -fopenmp -std=c++11 -fopenmp-targets=aaa-bbb-ccc-ddd -o - %s 2>&1 | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s diff --git a/clang/test/OpenMP/target_parallel_nowait_messages.cpp b/clang/test/OpenMP/target_parallel_nowait_messages.cpp index 8da03e4756a..3e285fca3ae 100644 --- a/clang/test/OpenMP/target_parallel_nowait_messages.cpp +++ b/clang/test/OpenMP/target_parallel_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_parallel_num_threads_messages.cpp b/clang/test/OpenMP/target_parallel_num_threads_messages.cpp index efc1d1327f5..79f77b7dc9f 100644 --- a/clang/test/OpenMP/target_parallel_num_threads_messages.cpp +++ b/clang/test/OpenMP/target_parallel_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -15,6 +15,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}} foo(); #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -33,7 +34,7 @@ T tmain(T argc, S **argv) { foo(); #pragma omp target parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); - #pragma omp target parallel num_threads (argc) + #pragma omp target parallel num_threads (argc + z) foo(); #pragma omp target parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} foo(); @@ -44,6 +45,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}} foo(); #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -52,7 +54,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} + #pragma omp target parallel num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} foo(); #pragma omp target parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} foo(); diff --git a/clang/test/OpenMP/target_parallel_private_messages.cpp b/clang/test/OpenMP/target_parallel_private_messages.cpp index 97ed1fc96ad..a23c2ea2f1a 100644 --- a/clang/test/OpenMP/target_parallel_private_messages.cpp +++ b/clang/test/OpenMP/target_parallel_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_parallel_proc_bind_messages.cpp b/clang/test/OpenMP/target_parallel_proc_bind_messages.cpp index a01b63d7fef..0b8d1821b30 100644 --- a/clang/test/OpenMP/target_parallel_proc_bind_messages.cpp +++ b/clang/test/OpenMP/target_parallel_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_parallel_reduction_messages.cpp b/clang/test/OpenMP/target_parallel_reduction_messages.cpp index eca57a8cce7..929d6af18cd 100644 --- a/clang/test/OpenMP/target_parallel_reduction_messages.cpp +++ b/clang/test/OpenMP/target_parallel_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -192,7 +192,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -220,7 +220,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp target parallel reduction(&& : argc) +#pragma omp target parallel reduction(&& : argc, z) foo(); #pragma omp target parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/clang/test/OpenMP/target_parallel_shared_messages.cpp b/clang/test/OpenMP/target_parallel_shared_messages.cpp index 2ade722dd3a..f32c9edc289 100644 --- a/clang/test/OpenMP/target_parallel_shared_messages.cpp +++ b/clang/test/OpenMP/target_parallel_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel shared // expected-error {{expected '(' after 'shared'}} foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel shared (S1) // expected-error {{'S1' does not refer to a value}} foo(); - #pragma omp target parallel shared (a, b, c, d, f) + #pragma omp target parallel shared (a, b, c, d, f, z) foo(); #pragma omp target parallel shared (argv[1]) // expected-error {{expected variable name}} foo(); diff --git a/clang/test/OpenMP/target_private_messages.cpp b/clang/test/OpenMP/target_private_messages.cpp index 245a0ea2b03..d0db6be2393 100644 --- a/clang/test/OpenMP/target_private_messages.cpp +++ b/clang/test/OpenMP/target_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_reduction_messages.cpp b/clang/test/OpenMP/target_reduction_messages.cpp index b9b744f4555..28c7c95723f 100644 --- a/clang/test/OpenMP/target_reduction_messages.cpp +++ b/clang/test/OpenMP/target_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -122,7 +122,7 @@ T tmain(T argc) { foo(); #pragma omp target reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}} foo(); -#pragma omp target reduction(&& : argc) +#pragma omp target reduction(&& : argc, z) foo(); #pragma omp target reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); @@ -189,7 +189,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -223,7 +223,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} +#pragma omp target reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); diff --git a/clang/test/OpenMP/target_simd_aligned_messages.cpp b/clang/test/OpenMP/target_simd_aligned_messages.cpp index d2628b43579..3069e702733 100644 --- a/clang/test/OpenMP/target_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/target_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/target_simd_collapse_messages.cpp b/clang/test/OpenMP/target_simd_collapse_messages.cpp index 8bf2c3bbf70..89b940221d9 100644 --- a/clang/test/OpenMP/target_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/target_simd_collapse_messages.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_simd_defaultmap_messages.cpp b/clang/test/OpenMP/target_simd_defaultmap_messages.cpp index 33e12c1e0e8..22846434545 100644 --- a/clang/test/OpenMP/target_simd_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_simd_defaultmap_messages.cpp @@ -1,13 +1,13 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } template <class T, typename S, int N, int ST> T tmain(T argc, S **argv) { - int i; + int i, k; #pragma omp target simd defaultmap // expected-error {{expected '(' after 'defaultmap'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd defaultmap ( // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/target_simd_depend_messages.cpp b/clang/test/OpenMP/target_simd_depend_messages.cpp index 69594db71c0..c02fac5a824 100644 --- a/clang/test/OpenMP/target_simd_depend_messages.cpp +++ b/clang/test/OpenMP/target_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_simd_device_messages.cpp b/clang/test/OpenMP/target_simd_device_messages.cpp index d705f614028..15bfec132a8 100644 --- a/clang/test/OpenMP/target_simd_device_messages.cpp +++ b/clang/test/OpenMP/target_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target simd device (argc + argc) + #pragma omp target simd device (argc + argc * z) for (i = 0; i < argc; ++i) foo(); #pragma omp target simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_simd_firstprivate_messages.cpp b/clang/test/OpenMP/target_simd_firstprivate_messages.cpp index eac95ade6f1..c26ef158f87 100644 --- a/clang/test/OpenMP/target_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target simd firstprivate(a, b, z) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -161,7 +161,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -181,7 +181,7 @@ int main(int argc, char **argv) { #pragma omp target simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd firstprivate(argc) +#pragma omp target simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_simd_if_messages.cpp b/clang/test/OpenMP/target_simd_if_messages.cpp index 60dee37ac54..94d2ab308da 100644 --- a/clang/test/OpenMP/target_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; int i; #pragma omp target simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -34,7 +35,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target simd if(argc) + #pragma omp target simd if(argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -53,7 +54,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -82,7 +83,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target simd if(target : argc) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}} + #pragma omp target simd if(target : argc + z) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if(target : argc) if (target :argc) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'if' clause with 'target' name modifier}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_simd_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_simd_is_device_ptr_messages.cpp index 6d6bc247c80..1d8c90632fd 100644 --- a/clang/test/OpenMP/target_simd_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; diff --git a/clang/test/OpenMP/target_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_simd_lastprivate_messages.cpp index 8b485840cef..6f1ef52d771 100644 --- a/clang/test/OpenMP/target_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_simd_linear_messages.cpp b/clang/test/OpenMP/target_simd_linear_messages.cpp index 86e3cc43fbf..5a2ef96ecd0 100644 --- a/clang/test/OpenMP/target_simd_linear_messages.cpp +++ b/clang/test/OpenMP/target_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -129,7 +129,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -169,7 +169,7 @@ int foomain(I argc, C **argv) { #pragma omp target simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd linear(i) +#pragma omp target simd linear(i, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -214,7 +214,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp target simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -234,7 +234,7 @@ int main(int argc, char **argv) { #pragma omp target simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd linear(argc) +#pragma omp target simd linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_simd_loop_messages.cpp b/clang/test/OpenMP/target_simd_loop_messages.cpp index 4ab02e75505..e634bd58574 100644 --- a/clang/test/OpenMP/target_simd_loop_messages.cpp +++ b/clang/test/OpenMP/target_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_simd_map_messages.cpp b/clang/test/OpenMP/target_simd_map_messages.cpp index 4b76042e456..a93d20eb35f 100644 --- a/clang/test/OpenMP/target_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_simd_messages.cpp b/clang/test/OpenMP/target_simd_messages.cpp index aa259c06966..37f5fae9502 100644 --- a/clang/test/OpenMP/target_simd_messages.cpp +++ b/clang/test/OpenMP/target_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_simd_misc_messages.c b/clang/test/OpenMP/target_simd_misc_messages.c index 3965d28af57..83d73fa013a 100644 --- a/clang/test/OpenMP/target_simd_misc_messages.c +++ b/clang/test/OpenMP/target_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target simd'}} #pragma omp target simd diff --git a/clang/test/OpenMP/target_simd_nowait_messages.cpp b/clang/test/OpenMP/target_simd_nowait_messages.cpp index c7ab302cb0f..1aee1109694 100644 --- a/clang/test/OpenMP/target_simd_nowait_messages.cpp +++ b/clang/test/OpenMP/target_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_simd_private_messages.cpp b/clang/test/OpenMP/target_simd_private_messages.cpp index f95d77c302a..e1b9585d4d8 100644 --- a/clang/test/OpenMP/target_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp target simd private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd private(e, g) +#pragma omp target simd private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}} S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp target simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -198,7 +198,7 @@ int main(int argc, char **argv) { #pragma omp target simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd private(argc) +#pragma omp target simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_simd_reduction_messages.cpp b/clang/test/OpenMP/target_simd_reduction_messages.cpp index e50159462c7..551099418d3 100644 --- a/clang/test/OpenMP/target_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/target_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -95,7 +95,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -140,7 +140,7 @@ T tmain(T argc) { #pragma omp target simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -217,7 +217,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp target simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(&& : argc) +#pragma omp target simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_simd_safelen_messages.cpp b/clang/test/OpenMP/target_simd_safelen_messages.cpp index 993d707114d..5e23ba1a74c 100644 --- a/clang/test/OpenMP/target_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/target_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_simd_simdlen_messages.cpp index 3a6e477886b..848770e86a1 100644 --- a/clang/test/OpenMP/target_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/target_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_default_messages.cpp b/clang/test/OpenMP/target_teams_default_messages.cpp index a144fa05f12..21fa8270ef6 100644 --- a/clang/test/OpenMP/target_teams_default_messages.cpp +++ b/clang/test/OpenMP/target_teams_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_teams_defaultmap_messages.cpp b/clang/test/OpenMP/target_teams_defaultmap_messages.cpp index b1b2bdd3896..36966bca8f4 100644 --- a/clang/test/OpenMP/target_teams_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_teams_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_depend_messages.cpp b/clang/test/OpenMP/target_teams_depend_messages.cpp index 79aef0d35a0..b8e1657d013 100644 --- a/clang/test/OpenMP/target_teams_depend_messages.cpp +++ b/clang/test/OpenMP/target_teams_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_device_messages.cpp b/clang/test/OpenMP/target_teams_device_messages.cpp index da56c470fb6..292b6e161ae 100644 --- a/clang/test/OpenMP/target_teams_device_messages.cpp +++ b/clang/test/OpenMP/target_teams_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,6 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { + int z; #pragma omp target teams device // expected-error {{expected '(' after 'device'}} foo(); #pragma omp target teams device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -24,7 +25,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams device (argc + argc) +#pragma omp target teams device (argc + argc + z) foo(); #pragma omp target teams device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'device' clause}} foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp index 7495a18443f..43528dad0eb 100644 --- a/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_default_messages.cpp b/clang/test/OpenMP/target_teams_distribute_default_messages.cpp index 539a296f267..fd834e7cba3 100644 --- a/clang/test/OpenMP/target_teams_distribute_default_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp b/clang/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp index a31015255cc..1842069227f 100644 --- a/clang/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_depend_messages.cpp b/clang/test/OpenMP/target_teams_distribute_depend_messages.cpp index 14c7745155d..bb10a8f300a 100644 --- a/clang/test/OpenMP/target_teams_distribute_depend_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_device_messages.cpp b/clang/test/OpenMP/target_teams_distribute_device_messages.cpp index aa62e099716..a50931d3057 100644 --- a/clang/test/OpenMP/target_teams_distribute_device_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute device (argc + argc) +#pragma omp target teams distribute device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp index 2544b1b9abb..69c1e55eeaa 100644 --- a/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp index 3e00beac7fd..8d53c3cbc0b 100644 --- a/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -113,7 +113,7 @@ int main(int argc, char **argv) { #pragma omp teams 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 teams distribute firstprivate(da) +#pragma omp target teams distribute firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute firstprivate(S2::S2s) diff --git a/clang/test/OpenMP/target_teams_distribute_if_messages.cpp b/clang/test/OpenMP/target_teams_distribute_if_messages.cpp index 94d82ab5ae6..fd1ffb08cbe 100644 --- a/clang/test/OpenMP/target_teams_distribute_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { int i; + T z; #pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -26,7 +27,7 @@ int tmain(T argc, S **argv) { #pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} +#pragma omp target teams distribute if (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2]) @@ -84,7 +85,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -97,7 +98,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} +#pragma omp target teams distribute if (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2]) diff --git a/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp index a7e33d0e78e..d02557c4e72 100644 --- a/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp index 0ce8cbf71ba..ecf364e2118 100644 --- a/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_teams_distribute_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_map_messages.cpp index 0de429736e1..f14233f49c0 100644 --- a/clang/test/OpenMP/target_teams_distribute_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_messages.cpp b/clang/test/OpenMP/target_teams_distribute_messages.cpp index 7b2080ae2b0..a685acf7f3e 100644 --- a/clang/test/OpenMP/target_teams_distribute_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_misc_messages.c index 6d17b512619..8fbe7c055b3 100644 --- a/clang/test/OpenMP/target_teams_distribute_misc_messages.c +++ b/clang/test/OpenMP/target_teams_distribute_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}} #pragma omp target teams distribute diff --git a/clang/test/OpenMP/target_teams_distribute_nowait_messages.cpp b/clang/test/OpenMP/target_teams_distribute_nowait_messages.cpp index b7a9a2548be..75bab8001bf 100644 --- a/clang/test/OpenMP/target_teams_distribute_nowait_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp index 8b351dc8fb4..c0a31fa19b2 100644 --- a/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute num_teams(argc + argc) +#pragma omp target teams distribute num_teams(argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute num_teams (argc + argc) +#pragma omp target teams distribute num_teams (argc + argc+z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp index a866b797641..502e4047ea1 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp index d5ea823858b..00e0704a6cc 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp index 8de99aeb214..ae17c2bf9db 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp index d853771c0d8..621f35808ce 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp index 64b682a601b..e78807a09fe 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -21,7 +21,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams distribute parallel for device (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp index a8abaffb464..a0efad18668 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp index d7be6062eb0..a03c781892b 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -112,7 +112,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for firstprivate(da) +#pragma omp target teams distribute parallel for firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for firstprivate(S2::S2s) 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 328e191ed35..e1114028b68 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 @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for if(argc) +#pragma omp target teams distribute parallel for if(argc -z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -61,7 +61,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -92,7 +92,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for if(parallel : argc) +#pragma omp target teams distribute parallel for if(parallel : argc / z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams distribute parallel for'}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp index e19e46c57b7..fdf98d40ea8 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp index d06628fef88..820010bea4c 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp index ca537dd976d..a7fe130a0d0 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp index f47655d686b..c67b1835345 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -102,7 +102,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(S2::S2sc) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for map(x) +#pragma omp target teams distribute parallel for map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(to: x) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -232,7 +232,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(argv[1]) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for map(ba) +#pragma omp target teams distribute parallel for map(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(ca) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp index e70c5df3898..a9a7ca1617d 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c index 820eb11189a..0e59e0d18f5 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}} #pragma omp target teams distribute parallel for diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp index d0e679936e6..f6b6061dd42 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp index ceb4fa567c6..d80b6ea380b 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for num_teams(argc + argc) +#pragma omp target teams distribute parallel for num_teams(argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for num_teams (argc + argc) +#pragma omp target teams distribute parallel for num_teams (argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp index f558936afae..d4b0c02c439 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams distribute parallel for num_threads (argc - z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams distribute parallel for num_threads (z - argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp index 86410b3fafd..eb5a4d63cad 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp index 659684e6f1e..11deefb2aa7 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp index 01175deeca9..296c0b0f66c 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -89,7 +89,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -127,7 +127,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(+ : z, ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -176,7 +176,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -218,7 +218,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(- : da, z) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp index 1f4f5f12e87..03bc0ff1d1f 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for schedule for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -50,7 +51,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} -#pragma omp target teams distribute parallel for schedule (dynamic, 1)) +#pragma omp target teams distribute parallel for schedule (dynamic, z+1)) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2) @@ -81,6 +82,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for schedule for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; @@ -114,7 +116,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} -#pragma omp target teams distribute parallel for schedule (static, 2+2)) +#pragma omp target teams distribute parallel for schedule (static, 2+2 + z)) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target teams distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp index f90a533edfe..75192796077 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp target teams distribute parallel for shared // expected-error {{expected '(' after 'shared'}} for (int j=0; j<100; j++) foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for shared (S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for shared (a, b, c, d, f) +#pragma omp target teams distribute parallel for shared (a, b, c, d, f, k) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for shared (argv[1]) // expected-error {{expected variable name}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp index 18685d2b30e..4be19a4c76b 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp index 4ca7a8ca9ad..81adc34c4dd 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp index d832d8cf161..7c46c964d2e 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp index c2c0e7be213..70361a13965 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp index 2690b01e222..d0735e43500 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp index c7b3bc9098d..bd68f36ae0f 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd device (argc + argc) +#pragma omp target teams distribute parallel for simd device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp index 079aaf69f55..ec634c8ac01 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp index 46a91c953b7..d018421fa8a 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -23,7 +23,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration extern S1 a; class S2 { mutable int a; - + public: S2() : a(0) {} S2(const S2 &s2) : a(s2.a) {} @@ -36,7 +36,7 @@ const S2 ba[5]; class S3 { int a; S3 &operator=(const S3 &s3); - + public: S3() : a(0) {} // expected-note 2 {{candidate constructor not viable: requires 0 arguments, but 1 was provided}} S3(S3 &s3) : a(s3.a) {} // expected-note 2 {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}} @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -112,7 +112,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd firstprivate(da) +#pragma omp target teams distribute parallel for simd firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd firstprivate(S2::S2s) 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 7554e5bc059..59c75893a17 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 @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} +#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) for (i = 0; i < argc; ++i) foo(); @@ -73,7 +73,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -82,7 +82,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} +#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp index 57abff3fb48..b368f2a3f54 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp index 26520795149..c273321068f 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) ++k; @@ -110,7 +110,7 @@ int foomain(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp target teams distribute parallel for simd lastprivate(e, g, z) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} @@ -152,7 +152,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; float k; #pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd lastprivate(ba) +#pragma omp target teams distribute parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp index 029401a64c8..111fe99bf85 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp index 6c7cb795059..fda6b5ff316 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp index 64fe5f6e092..908184805a8 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -88,7 +88,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(l[true:true]) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd map(x) +#pragma omp target teams distribute parallel for simd map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(tofrom: t[:I]) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -218,7 +218,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(to) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd map(to, x) +#pragma omp target teams distribute parallel for simd map(to, x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(to x) // expected-error {{expected ',' or ')' in 'map' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp index a98f7d83ecd..f6050925d64 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c index 7005c7b027a..07db3991bba 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for simd'}} #pragma omp target teams distribute parallel for simd diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp index 458eaf72c34..0f13d35c067 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp index 6564f104a12..8d611f76ed5 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for simd num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for simd num_teams(argc + argc) +#pragma omp target teams distribute parallel for simd num_teams(argc + argc/z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for simd num_teams (argc + argc) +#pragma omp target teams distribute parallel for simd num_teams (argc + argc-z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp index 58fab1e8df6..397c83d199e 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd num_threads (argc) +#pragma omp target teams distribute parallel for simd num_threads (argc + k) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} +#pragma omp target teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp index 1f3a1313269..8598fb6663c 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp index 3ae5268667d..ffac5417c98 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp index 6e298a7e6b0..9336d94807d 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -89,7 +89,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -121,7 +121,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -176,7 +176,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -210,7 +210,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp index d05f071e915..14ac5da1b58 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp index c24a5431842..96b5aac2a53 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for simd schedule for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -50,7 +51,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} -#pragma omp target teams distribute parallel for simd schedule (dynamic, 1)) +#pragma omp target teams distribute parallel for simd schedule (dynamic, 1 + z)) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2) @@ -81,6 +82,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for simd schedule for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; @@ -117,7 +119,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd schedule (static, 2+2)) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; -#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) +#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'schedule' clause}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp index f59ecbd5837..89d78744c90 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for simd shared // expected-error {{expected '(' after 'shared'}} for (int j=0; j<100; j++) foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd shared (S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); - #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f) + #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f, z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd shared (argv[1]) // expected-error {{expected variable name}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp index 1c490582fd8..e0c89d4c990 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -33,9 +33,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{expression is not an integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}} - for (int i = ST; i < N; i++) + for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - + #pragma omp target teams distribute parallel for simd safelen (ST // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -45,7 +45,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for simd safelen ((ST > 0) ? 1 + ST : 2) - for (int i = ST; i < N; i++) + for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L @@ -102,7 +102,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - + #if __cplusplus >= 201103L // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp index ea8b1a77513..1905b554784 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for simd thread_limit(C) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd thread_limit(argc + argc) +#pragma omp target teams distribute parallel for simd thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}} for (int j=0; j<100; j++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd thread_limit (argc + argc) +#pragma omp target teams distribute parallel for simd thread_limit (argc + argc-z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp index bd04e934a24..a015f9984ea 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -38,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for thread_limit(argc + argc) +#pragma omp target teams distribute parallel for thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}} @@ -60,6 +61,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -78,7 +80,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for thread_limit (argc + argc) +#pragma omp target teams distribute parallel for thread_limit (argc -z + argc) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}} diff --git a/clang/test/OpenMP/target_teams_distribute_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_private_messages.cpp index 93989a58401..a2233ed0760 100644 --- a/clang/test/OpenMP/target_teams_distribute_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp b/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp index bdde93bd93a..b0f30e2eef2 100644 --- a/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -181,7 +181,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -213,7 +213,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_shared_messages.cpp b/clang/test/OpenMP/target_teams_distribute_shared_messages.cpp index 37e0aa1b5b6..21b7060f773 100644 --- a/clang/test/OpenMP/target_teams_distribute_shared_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp index 2ec53ee99e0..2e70bb3ac43 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp index 6561091ec8a..612fc728a85 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp index b8ac8aee672..88f91250608 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp index 7e2012ace37..2e1be6c725b 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_device_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_device_messages.cpp index 1f47d1c7263..993ff491253 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_device_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd device (argc + argc) +#pragma omp target teams distribute simd device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp index b9fdc18a0ec..507ddabd2fc 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp index 1ce3adc74d6..82274fe00e2 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -112,7 +112,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd firstprivate(da) +#pragma omp target teams distribute simd firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd firstprivate(S2::S2s) 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 43d8957f006..7134a8394cb 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd if(argc) +#pragma omp target teams distribute simd if(argc * z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if(target // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -57,7 +57,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -88,7 +88,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if(target: argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd if(target: argc) +#pragma omp target teams distribute simd if(target: z/argc) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if(target : argc) if (distribute:argc) // expected-error {{directive name modifier 'distribute' is not allowed for '#pragma omp target teams distribute simd'}} for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp index 34083056926..3de17bf0cec 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp index 1235f81a212..f7fb69f0527 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) ++k; @@ -110,7 +110,7 @@ int foomain(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp target teams distribute simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} @@ -152,7 +152,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; float k; #pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd lastprivate(ba) +#pragma omp target teams distribute simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp index f4131ed7aed..90b719c8d21 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp index cba8e820561..1ec1e3bd8f4 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp index 3806c4ecf5b..313bd7400a7 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -102,7 +102,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(S2::S2sc) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd map(x) +#pragma omp target teams distribute simd map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(to: x) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -232,7 +232,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(argv[1]) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd map(ba) +#pragma omp target teams distribute simd map(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(ca) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_simd_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_messages.cpp index 6ee8073357f..77e85f1c137 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c index 397795ff6e0..45f310ffdf6 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c +++ b/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}} #pragma omp target teams distribute simd diff --git a/clang/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp index 25daa81eb74..1a9d0b5a516 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp index cdc5244fe1e..7c44d6861ef 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute simd num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -26,7 +27,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute simd num_teams(argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} +#pragma omp target teams distribute simd num_teams(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -59,7 +61,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd num_teams (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute simd num_teams (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} +#pragma omp target teams distribute simd num_teams (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp index 7edcaf19a38..2c53a4a1f83 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp target teams distribute simd private // expected-error {{expected '(' after 'private'}} @@ -89,7 +89,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd private (argv[1]) // expected-error {{expected variable name}} +#pragma omp target teams distribute simd private (k, argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd private(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams distribute simd' directive}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp index c033c058025..84da687171a 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -89,7 +89,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -121,9 +121,9 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); @@ -176,7 +176,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -216,7 +216,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute simd reduction(* : ca, z) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp index da5c8eb75d9..36af17e9354 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp index 3147baedae8..a32aa2207aa 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute simd shared // expected-error {{expected '(' after 'shared'}} for (int j=0; j<100; j++) foo(); @@ -73,7 +73,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int j=0; j<100; j++) foo(); - #pragma omp target teams distribute simd shared (argc) + #pragma omp target teams distribute simd shared (argc, z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd shared (S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp index 851fff36f20..322c64607d0 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp index 593650b38cc..fcdcde53f3a 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute simd thread_limit(C) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd thread_limit(argc + argc) +#pragma omp target teams distribute simd thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}} for (int j=0; j<100; j++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd thread_limit (argc + argc) +#pragma omp target teams distribute simd thread_limit (argc + argc - z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}} diff --git a/clang/test/OpenMP/target_teams_firstprivate_messages.cpp b/clang/test/OpenMP/target_teams_firstprivate_messages.cpp index 9f6eb8ad81e..7958d6f494a 100644 --- a/clang/test/OpenMP/target_teams_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -74,7 +74,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams firstprivate // expected-error {{expected '(' after 'firstprivate'}} foo(); @@ -98,7 +98,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams' directive}} foo(); -#pragma omp target teams firstprivate(ca) +#pragma omp target teams firstprivate(ca, z) foo(); #pragma omp target teams firstprivate(da) foo(); diff --git a/clang/test/OpenMP/target_teams_if_messages.cpp b/clang/test/OpenMP/target_teams_if_messages.cpp index 84c900a41ab..8d3d690d631 100644 --- a/clang/test/OpenMP/target_teams_if_messages.cpp +++ b/clang/test/OpenMP/target_teams_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp target teams if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -21,7 +22,7 @@ int tmain(T argc, S **argv) { foo(); #pragma omp target teams if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); -#pragma omp target teams if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}} +#pragma omp target teams if (z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}} foo(); #pragma omp target teams if (argc > 0 ? argv[1] : argv[2]) foo(); @@ -52,6 +53,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target teams if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -80,7 +82,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); -#pragma omp target teams if(target : argc) +#pragma omp target teams if(target : z) foo(); #pragma omp target teams if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams'}} foo(); diff --git a/clang/test/OpenMP/target_teams_is_device_ptr_messages.cpp b/clang/test/OpenMP/target_teams_is_device_ptr_messages.cpp index 8ae6d7fed0e..1885d1e6994 100644 --- a/clang/test/OpenMP/target_teams_is_device_ptr_messages.cpp +++ b/clang/test/OpenMP/target_teams_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; diff --git a/clang/test/OpenMP/target_teams_map_messages.cpp b/clang/test/OpenMP/target_teams_map_messages.cpp index 8608756bd4e..d70598b384b 100644 --- a/clang/test/OpenMP/target_teams_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_map_messages.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized #ifdef CCODE void foo(int arg) { const int n = 0; diff --git a/clang/test/OpenMP/target_teams_messages.cpp b/clang/test/OpenMP/target_teams_messages.cpp index 362767ef1d8..406b9841f50 100644 --- a/clang/test/OpenMP/target_teams_messages.cpp +++ b/clang/test/OpenMP/target_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_nowait_messages.cpp b/clang/test/OpenMP/target_teams_nowait_messages.cpp index aeb18294031..bed2f979891 100644 --- a/clang/test/OpenMP/target_teams_nowait_messages.cpp +++ b/clang/test/OpenMP/target_teams_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_num_teams_messages.cpp index 9134af640c9..94f4c0f811b 100644 --- a/clang/test/OpenMP/target_teams_num_teams_messages.cpp +++ b/clang/test/OpenMP/target_teams_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams num_teams(C) foo(); #pragma omp target teams num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { foo(); #pragma omp target teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams num_teams(argc + argc) +#pragma omp target teams num_teams(argc + argc + z) foo(); #pragma omp target teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}} foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams num_teams // expected-error {{expected '(' after 'num_teams'}} foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams num_teams (argc + argc) +#pragma omp target teams num_teams (argc + argc*z) foo(); #pragma omp target teams num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}} diff --git a/clang/test/OpenMP/target_teams_private_messages.cpp b/clang/test/OpenMP/target_teams_private_messages.cpp index 7714113af70..85309e953b9 100644 --- a/clang/test/OpenMP/target_teams_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -66,7 +66,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams private // expected-error {{expected '(' after 'private'}} foo(); @@ -104,7 +104,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}} foo(); -#pragma omp target teams private(i) +#pragma omp target teams private(i, z) foo(); #pragma omp target teams private(j) foo(); diff --git a/clang/test/OpenMP/target_teams_reduction_messages.cpp b/clang/test/OpenMP/target_teams_reduction_messages.cpp index 2d8a47b7f89..77684296fd0 100644 --- a/clang/test/OpenMP/target_teams_reduction_messages.cpp +++ b/clang/test/OpenMP/target_teams_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { foo(); #pragma omp target teams reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -191,7 +191,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -219,7 +219,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp target teams reduction(&& : argc) +#pragma omp target teams reduction(&& : argc, z) foo(); #pragma omp target teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/clang/test/OpenMP/target_teams_shared_messages.cpp b/clang/test/OpenMP/target_teams_shared_messages.cpp index 3fb84967b9d..5a0947305af 100644 --- a/clang/test/OpenMP/target_teams_shared_messages.cpp +++ b/clang/test/OpenMP/target_teams_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_teams_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_thread_limit_messages.cpp index 4b0a4b05c82..0693e64a711 100644 --- a/clang/test/OpenMP/target_teams_thread_limit_messages.cpp +++ b/clang/test/OpenMP/target_teams_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams thread_limit(C) foo(); #pragma omp target teams thread_limit(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { foo(); #pragma omp target teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams thread_limit(argc + argc) +#pragma omp target teams thread_limit(argc + argc + z) foo(); #pragma omp target teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}} foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams thread_limit // expected-error {{expected '(' after 'thread_limit'}} foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams thread_limit (argc + argc) +#pragma omp target teams thread_limit (argc + argc/ z) foo(); #pragma omp target teams thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}} diff --git a/clang/test/OpenMP/target_update_depend_messages.cpp b/clang/test/OpenMP/target_update_depend_messages.cpp index 016219c073b..e09284f7291 100644 --- a/clang/test/OpenMP/target_update_depend_messages.cpp +++ b/clang/test/OpenMP/target_update_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_update_device_messages.cpp b/clang/test/OpenMP/target_update_device_messages.cpp index 228b4a800a0..8b4aefaf580 100644 --- a/clang/test/OpenMP/target_update_device_messages.cpp +++ b/clang/test/OpenMP/target_update_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,14 +13,14 @@ struct S1; // expected-note 2 {{declared here}} template <class T, class S> int tmain(T argc, S **argv) { - int i; + int i, z; #pragma omp target update to(i) device // expected-error {{expected '(' after 'device'}} #pragma omp target update to(i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(i) device () // expected-error {{expected expression}} #pragma omp target update to(i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} #pragma omp target update from(i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} -#pragma omp target update from(i) device (argc + argc) +#pragma omp target update from(i) device (argc + z) #pragma omp target update from(i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}} #pragma omp target update from(i) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target update from(i) device (3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}} @@ -28,14 +28,14 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int j; + int j, z; #pragma omp target update to(j) device // expected-error {{expected '(' after 'device'}} #pragma omp target update from(j) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(j) device () // expected-error {{expected expression}} #pragma omp target update from(j) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(j) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} #pragma omp target update from(j) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} -#pragma omp target update to(j) device (argc + argc) +#pragma omp target update to(j) device (z + argc) #pragma omp target update from(j) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}} #pragma omp target update to(j) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target update from(j) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} diff --git a/clang/test/OpenMP/target_update_from_messages.cpp b/clang/test/OpenMP/target_update_from_messages.cpp index e5a1f045e23..b5e7c5004e1 100644 --- a/clang/test/OpenMP/target_update_from_messages.cpp +++ b/clang/test/OpenMP/target_update_from_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_update_if_messages.cpp b/clang/test/OpenMP/target_update_if_messages.cpp index 4f229a768c7..9ded332b04e 100644 --- a/clang/test/OpenMP/target_update_if_messages.cpp +++ b/clang/test/OpenMP/target_update_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -24,11 +24,11 @@ int tmain(T argc, S **argv) { #pragma omp target update from(n) if (S) // expected-error {{'S' does not refer to a value}} #pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(n) if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} -#pragma omp target update to(n) if(argc) +#pragma omp target update to(n) if(argc + n) #pragma omp target update from(n) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(n) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} -#pragma omp target update to(n) if(target update : argc) +#pragma omp target update to(n) if(target update : argc + n) #pragma omp target update from(n) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}} #pragma omp target update to(n) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}} #pragma omp target update from(n) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} @@ -52,7 +52,7 @@ int main(int argc, char **argv) { #pragma omp target update to(m) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(m) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(m) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} -#pragma omp target update from(m) if(target update : argc) +#pragma omp target update from(m) if(target update : argc + m) #pragma omp target update to(m) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}} #pragma omp target update from(m) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}} #pragma omp target update to(m) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/clang/test/OpenMP/target_update_messages.cpp b/clang/test/OpenMP/target_update_messages.cpp index 68b76344b9d..0adb87584e1 100644 --- a/clang/test/OpenMP/target_update_messages.cpp +++ b/clang/test/OpenMP/target_update_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/target_update_nowait_messages.cpp b/clang/test/OpenMP/target_update_nowait_messages.cpp index fb3d035af9d..fc0314a3187 100644 --- a/clang/test/OpenMP/target_update_nowait_messages.cpp +++ b/clang/test/OpenMP/target_update_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int main(int argc, char **argv) { int i; diff --git a/clang/test/OpenMP/target_update_to_messages.cpp b/clang/test/OpenMP/target_update_to_messages.cpp index 58f6aee234b..296b25843a5 100644 --- a/clang/test/OpenMP/target_update_to_messages.cpp +++ b/clang/test/OpenMP/target_update_to_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/task_default_messages.cpp b/clang/test/OpenMP/task_default_messages.cpp index 0eb26856e78..4826c253aa0 100644 --- a/clang/test/OpenMP/task_default_messages.cpp +++ b/clang/test/OpenMP/task_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/task_depend_messages.cpp b/clang/test/OpenMP/task_depend_messages.cpp index 12d1d1a684e..63ad8474817 100644 --- a/clang/test/OpenMP/task_depend_messages.cpp +++ b/clang/test/OpenMP/task_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/task_final_messages.cpp b/clang/test/OpenMP/task_final_messages.cpp index 49b9bfe204f..7cfdf8c635b 100644 --- a/clang/test/OpenMP/task_final_messages.cpp +++ b/clang/test/OpenMP/task_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,11 +13,12 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp task final // expected-error {{expected '(' after 'final'}} #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task final () // expected-error {{expected expression}} #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} + #pragma omp task final (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} #pragma omp task final (argc > 0 ? argv[1] : argv[2]) #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}} #pragma omp task final (S) // expected-error {{'S' does not refer to a value}} @@ -30,11 +31,12 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp task final // expected-error {{expected '(' after 'final'}} #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task final () // expected-error {{expected expression}} #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} + #pragma omp task final (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} #pragma omp task final (argc > 0 ? argv[1] : argv[2]) #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}} #pragma omp task final (S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/task_firstprivate_messages.cpp b/clang/test/OpenMP/task_firstprivate_messages.cpp index f299c755183..b8ff2cdebc9 100644 --- a/clang/test/OpenMP/task_firstprivate_messages.cpp +++ b/clang/test/OpenMP/task_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -92,7 +92,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; static int m; #pragma omp task firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -106,7 +106,7 @@ int main(int argc, char **argv) { #pragma omp task firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} #pragma omp task firstprivate(argv[1]) // expected-error {{expected variable name}} #pragma omp task allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'task' directive}} -#pragma omp task firstprivate(ca) +#pragma omp task firstprivate(ca,z ) #pragma omp task firstprivate(da) #pragma omp task firstprivate(S2::S2s) #pragma omp task firstprivate(S2::S2sc) diff --git a/clang/test/OpenMP/task_if_messages.cpp b/clang/test/OpenMP/task_if_messages.cpp index fca57bb05d0..305af22149d 100644 --- a/clang/test/OpenMP/task_if_messages.cpp +++ b/clang/test/OpenMP/task_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp task if // expected-error {{expected '(' after 'if'}} #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if () // expected-error {{expected expression}} @@ -23,7 +24,7 @@ int tmain(T argc, S **argv) { #pragma omp task if (S) // expected-error {{'S' does not refer to a value}} #pragma omp task if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task if(argc) + #pragma omp task if(argc + z) #pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : argc) @@ -36,6 +37,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp task if // expected-error {{expected '(' after 'if'}} #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if () // expected-error {{expected expression}} @@ -50,7 +52,7 @@ int main(int argc, char **argv) { #pragma omp task if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task if(task : argc) + #pragma omp task if(task : argc + z) #pragma omp task if(task : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp task'}} #pragma omp task if(task : argc) if (task:argc) // expected-error {{directive '#pragma omp task' cannot contain more than one 'if' clause with 'task' name modifier}} #pragma omp task if(task : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/clang/test/OpenMP/task_messages.cpp b/clang/test/OpenMP/task_messages.cpp index 92bb14983b8..e52b2fae5c7 100644 --- a/clang/test/OpenMP/task_messages.cpp +++ b/clang/test/OpenMP/task_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/task_priority_messages.cpp b/clang/test/OpenMP/task_priority_messages.cpp index 2e184ce1a91..140e8f0b719 100644 --- a/clang/test/OpenMP/task_priority_messages.cpp +++ b/clang/test/OpenMP/task_priority_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,12 +13,13 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp task priority // expected-error {{expected '(' after 'priority'}} #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority () // expected-error {{expected expression}} #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} - #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] + z) #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}} #pragma omp task priority (S) // expected-error {{'S' does not refer to a value}} #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -30,12 +31,13 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp task priority // expected-error {{expected '(' after 'priority'}} #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority () // expected-error {{expected expression}} #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} - #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] - z) #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}} #pragma omp task priority (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/task_private_messages.cpp b/clang/test/OpenMP/task_private_messages.cpp index 934f5aad8c5..df082a56314 100644 --- a/clang/test/OpenMP/task_private_messages.cpp +++ b/clang/test/OpenMP/task_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -75,7 +75,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp task private // expected-error {{expected '(' after 'private'}} #pragma omp task private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -85,7 +85,7 @@ int main(int argc, char **argv) { #pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} #pragma omp task private(argc argv) // expected-error {{expected ',' or ')' in 'private' clause}} #pragma omp task private(S1) // expected-error {{'S1' does not refer to a value}} -#pragma omp task private(a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} +#pragma omp task private(z, a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} #pragma omp task private(argv[1]) // expected-error {{expected variable name}} #pragma omp task private(ba) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}} #pragma omp task private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} diff --git a/clang/test/OpenMP/task_shared_messages.cpp b/clang/test/OpenMP/task_shared_messages.cpp index bdd46ab4282..309d56b423f 100644 --- a/clang/test/OpenMP/task_shared_messages.cpp +++ b/clang/test/OpenMP/task_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -63,7 +63,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp task shared // expected-error {{expected '(' after 'shared'}} foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { foo(); #pragma omp task shared(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} foo(); -#pragma omp task shared(argc) +#pragma omp task shared(argc, z) foo(); #pragma omp task shared(S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/clang/test/OpenMP/taskgroup_messages.cpp b/clang/test/OpenMP/taskgroup_messages.cpp index dfb4725280b..f7503ff3c14 100644 --- a/clang/test/OpenMP/taskgroup_messages.cpp +++ b/clang/test/OpenMP/taskgroup_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized int foo(); diff --git a/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp b/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp index 64d7c6c3ca1..fe7baf4091d 100644 --- a/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp +++ b/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -85,7 +85,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -137,7 +137,7 @@ T tmain(T argc) { foo(); #pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); -#pragma omp taskgroup task_reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} +#pragma omp taskgroup task_reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}} foo(); #pragma omp parallel private(k) #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -232,7 +232,7 @@ int main(int argc, char **argv) { foo(); #pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}} foo(); -#pragma omp taskgroup task_reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp taskgroup task_reduction(+ : o, z) // expected-error {{no viable overloaded '='}} foo(); #pragma omp parallel private(k) #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}} diff --git a/clang/test/OpenMP/taskloop_collapse_messages.cpp b/clang/test/OpenMP/taskloop_collapse_messages.cpp index 091b8b83212..5551a0254e1 100644 --- a/clang/test/OpenMP/taskloop_collapse_messages.cpp +++ b/clang/test/OpenMP/taskloop_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}} // expected-error@+2 2 {{expression is not an integral constant expression}} // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} - #pragma omp taskloop collapse (argc + #pragma omp taskloop collapse (argc for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp taskloop collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/taskloop_final_messages.cpp b/clang/test/OpenMP/taskloop_final_messages.cpp index d53b12322e9..f7ef2959df3 100644 --- a/clang/test/OpenMP/taskloop_final_messages.cpp +++ b/clang/test/OpenMP/taskloop_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2]) +#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}} @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2]) +#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}} diff --git a/clang/test/OpenMP/taskloop_firstprivate_messages.cpp b/clang/test/OpenMP/taskloop_firstprivate_messages.cpp index fde767da94e..9ef869f50ae 100644 --- a/clang/test/OpenMP/taskloop_firstprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -119,7 +119,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} +#pragma omp taskloop firstprivate(z, e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel diff --git a/clang/test/OpenMP/taskloop_grainsize_messages.cpp b/clang/test/OpenMP/taskloop_grainsize_messages.cpp index a1cfea474c9..174d910d9fb 100644 --- a/clang/test/OpenMP/taskloop_grainsize_messages.cpp +++ b/clang/test/OpenMP/taskloop_grainsize_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}} @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -69,7 +71,7 @@ int main(int argc, char **argv) { #pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}} diff --git a/clang/test/OpenMP/taskloop_in_reduction_messages.cpp b/clang/test/OpenMP/taskloop_in_reduction_messages.cpp index 00c17d0a19b..1441637ed28 100644 --- a/clang/test/OpenMP/taskloop_in_reduction_messages.cpp +++ b/clang/test/OpenMP/taskloop_in_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/clang/test/OpenMP/taskloop_lastprivate_messages.cpp b/clang/test/OpenMP/taskloop_lastprivate_messages.cpp index 929d2b801c5..3d3aceea84d 100644 --- a/clang/test/OpenMP/taskloop_lastprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -121,7 +121,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp taskloop lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -199,7 +199,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop lastprivate(argc) +#pragma omp taskloop lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/taskloop_loop_messages.cpp b/clang/test/OpenMP/taskloop_loop_messages.cpp index 324114d6d74..d38e8d70963 100644 --- a/clang/test/OpenMP/taskloop_loop_messages.cpp +++ b/clang/test/OpenMP/taskloop_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/taskloop_misc_messages.c b/clang/test/OpenMP/taskloop_misc_messages.c index 4e2ac0aab7c..6ab4696fc73 100644 --- a/clang/test/OpenMP/taskloop_misc_messages.c +++ b/clang/test/OpenMP/taskloop_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop'}} #pragma omp taskloop diff --git a/clang/test/OpenMP/taskloop_num_tasks_messages.cpp b/clang/test/OpenMP/taskloop_num_tasks_messages.cpp index cf506ff5df9..71812abc323 100644 --- a/clang/test/OpenMP/taskloop_num_tasks_messages.cpp +++ b/clang/test/OpenMP/taskloop_num_tasks_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}} @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -69,7 +71,7 @@ int main(int argc, char **argv) { #pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}} diff --git a/clang/test/OpenMP/taskloop_priority_messages.cpp b/clang/test/OpenMP/taskloop_priority_messages.cpp index cbfd2579f58..2687708baa9 100644 --- a/clang/test/OpenMP/taskloop_priority_messages.cpp +++ b/clang/test/OpenMP/taskloop_priority_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}} @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}} diff --git a/clang/test/OpenMP/taskloop_private_messages.cpp b/clang/test/OpenMP/taskloop_private_messages.cpp index 107a2f4b766..bc563ca112c 100644 --- a/clang/test/OpenMP/taskloop_private_messages.cpp +++ b/clang/test/OpenMP/taskloop_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp taskloop private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp taskloop private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop private(e, g) +#pragma omp taskloop private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}} S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp taskloop private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -244,7 +244,7 @@ int main(int argc, char **argv) { #pragma omp taskloop private(j) for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop private(i) +#pragma omp taskloop private(i, z) for (int k = 0; k < argc; ++k) ++k; static int si; diff --git a/clang/test/OpenMP/taskloop_reduction_messages.cpp b/clang/test/OpenMP/taskloop_reduction_messages.cpp index a1c533cfe09..b7a0f2eb0d9 100644 --- a/clang/test/OpenMP/taskloop_reduction_messages.cpp +++ b/clang/test/OpenMP/taskloop_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -104,7 +104,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -149,7 +149,7 @@ T tmain(T argc) { #pragma omp taskloop reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp taskloop reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -226,7 +226,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -265,7 +265,7 @@ int main(int argc, char **argv) { #pragma omp taskloop reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(&& : argc) +#pragma omp taskloop reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp b/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp index 24cdd00e6b3..c7a62b8f4a2 100644 --- a/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp b/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp index fd620c8fc16..7730990ac89 100644 --- a/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/taskloop_simd_final_messages.cpp b/clang/test/OpenMP/taskloop_simd_final_messages.cpp index b7393661c94..68360aa1a30 100644 --- a/clang/test/OpenMP/taskloop_simd_final_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -25,7 +26,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} +#pragma omp taskloop simd final(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2]) @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -63,7 +65,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} +#pragma omp taskloop simd final(z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2]) diff --git a/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp b/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp index 7553bd2fece..1aea8c02a04 100644 --- a/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -115,7 +115,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop simd firstprivate(argv[1]) // expected-error {{expected variable name}} +#pragma omp taskloop simd firstprivate(z, argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -182,7 +182,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -209,7 +209,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd firstprivate(argc) +#pragma omp taskloop simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/taskloop_simd_grainsize_messages.cpp b/clang/test/OpenMP/taskloop_simd_grainsize_messages.cpp index 3441e59e56d..4c4bf39fe8c 100644 --- a/clang/test/OpenMP/taskloop_simd_grainsize_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_grainsize_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -25,7 +26,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd grainsize (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd grainsize (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) diff --git a/clang/test/OpenMP/taskloop_simd_in_reduction_messages.cpp b/clang/test/OpenMP/taskloop_simd_in_reduction_messages.cpp index 6ad8bad2a32..77243696911 100644 --- a/clang/test/OpenMP/taskloop_simd_in_reduction_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_in_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -125,7 +125,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -163,8 +163,8 @@ T tmain(T argc) { #pragma omp taskloop simd in_reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskgroup task_reduction(|:argc) // expected-error {{invalid operands to binary expression ('float' and 'float')}} -#pragma omp taskloop simd in_reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} +#pragma omp taskgroup task_reduction(|:z) // expected-error {{invalid operands to binary expression ('float' and 'float')}} +#pragma omp taskloop simd in_reduction(| : z, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}} @@ -268,7 +268,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -308,8 +308,8 @@ int main(int argc, char **argv) { #pragma omp taskloop simd in_reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskgroup task_reduction(&&:argc) -#pragma omp taskloop simd in_reduction(&& : argc) +#pragma omp taskgroup task_reduction(&&:argc, z) +#pragma omp taskloop simd in_reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp b/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp index ec0d071a1d5..70c508fdd0b 100644 --- a/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -113,7 +113,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp taskloop simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -199,7 +199,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd lastprivate(argc) +#pragma omp taskloop simd lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/taskloop_simd_linear_messages.cpp b/clang/test/OpenMP/taskloop_simd_linear_messages.cpp index 05b08d6d75c..0c1acf370a5 100644 --- a/clang/test/OpenMP/taskloop_simd_linear_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -113,7 +113,7 @@ S3 h; template<class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp taskloop simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -149,7 +149,7 @@ template<class I, class C> int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp taskloop simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} + #pragma omp taskloop simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}} for (int k = 0; k < argc; ++k) ++k; @@ -204,7 +204,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp taskloop simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}} for (int k = 0; k < argc; ++k) ++k; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp taskloop simd linear (argc) + #pragma omp taskloop simd linear (argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; diff --git a/clang/test/OpenMP/taskloop_simd_loop_messages.cpp b/clang/test/OpenMP/taskloop_simd_loop_messages.cpp index fcae0130d96..666dba52008 100644 --- a/clang/test/OpenMP/taskloop_simd_loop_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/taskloop_simd_misc_messages.c b/clang/test/OpenMP/taskloop_simd_misc_messages.c index bb4b2dfbb85..2b6bbe9f378 100644 --- a/clang/test/OpenMP/taskloop_simd_misc_messages.c +++ b/clang/test/OpenMP/taskloop_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}} #pragma omp taskloop simd diff --git a/clang/test/OpenMP/taskloop_simd_num_tasks_messages.cpp b/clang/test/OpenMP/taskloop_simd_num_tasks_messages.cpp index 3267d294b75..0b30d0935b8 100644 --- a/clang/test/OpenMP/taskloop_simd_num_tasks_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_num_tasks_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}} @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -69,7 +71,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}} diff --git a/clang/test/OpenMP/taskloop_simd_priority_messages.cpp b/clang/test/OpenMP/taskloop_simd_priority_messages.cpp index 44e0b57a00d..f51cff41370 100644 --- a/clang/test/OpenMP/taskloop_simd_priority_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_priority_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -25,7 +26,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc]) @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -63,7 +65,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc]) diff --git a/clang/test/OpenMP/taskloop_simd_private_messages.cpp b/clang/test/OpenMP/taskloop_simd_private_messages.cpp index 4198c891c23..c7b7ba05426 100644 --- a/clang/test/OpenMP/taskloop_simd_private_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template <class I, class C> int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp taskloop simd private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop simd private(e, g) +#pragma omp taskloop simd private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { S5 g(5); S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}} S7<S6<float> > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -208,7 +208,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop simd private(argc) +#pragma omp taskloop simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/taskloop_simd_reduction_messages.cpp b/clang/test/OpenMP/taskloop_simd_reduction_messages.cpp index dc3a389fc0d..7ac4c2488cf 100644 --- a/clang/test/OpenMP/taskloop_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -104,7 +104,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -161,7 +161,7 @@ T tmain(T argc) { #pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp taskloop simd reduction(* : z, ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} @@ -226,7 +226,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -265,7 +265,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(&& : argc) +#pragma omp taskloop simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp b/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp index b926689c3b1..8af6dd02cc3 100644 --- a/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp b/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp index 75d9a1d360b..59e4b8b8f00 100644 --- a/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}} // expected-error@+2 2 {{expression is not an integral constant expression}} // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} - #pragma omp taskloop simd simdlen (argc + #pragma omp taskloop simd simdlen (argc for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp taskloop simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/clang/test/OpenMP/taskwait_messages.cpp b/clang/test/OpenMP/taskwait_messages.cpp index ed7c53b070d..793fb978b5b 100644 --- a/clang/test/OpenMP/taskwait_messages.cpp +++ b/clang/test/OpenMP/taskwait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized template <class T> T tmain(T argc) { diff --git a/clang/test/OpenMP/taskyield_messages.cpp b/clang/test/OpenMP/taskyield_messages.cpp index cb66ccddf30..d86f1b750c4 100644 --- a/clang/test/OpenMP/taskyield_messages.cpp +++ b/clang/test/OpenMP/taskyield_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized template <class T> T tmain(T argc) { diff --git a/clang/test/OpenMP/teams_default_messages.cpp b/clang/test/OpenMP/teams_default_messages.cpp index 28a5e2902c6..a0250504060 100644 --- a/clang/test/OpenMP/teams_default_messages.cpp +++ b/clang/test/OpenMP/teams_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_collapse_messages.cpp index d95109c3dc3..35a2d170857 100644 --- a/clang/test/OpenMP/teams_distribute_collapse_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_default_messages.cpp b/clang/test/OpenMP/teams_distribute_default_messages.cpp index 9ebce9aea05..7f000208303 100644 --- a/clang/test/OpenMP/teams_distribute_default_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp index a86a87a9ef5..22d2408d3f1 100644 --- a/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1<<z) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp index b1f60f1ecb3..63237e12c96 100644 --- a/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target @@ -108,7 +108,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute firstprivate(ba) +#pragma omp teams distribute firstprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp index 35231edbe8c..f17f7bb5e7d 100644 --- a/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/teams_distribute_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_loop_messages.cpp index a96d86d7d6a..824a51bf096 100644 --- a/clang/test/OpenMP/teams_distribute_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp index 103a6d26fd4..5156439e677 100644 --- a/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute num_teams(C) for (int i=0; i<100; i++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute num_teams(argc + argc) +#pragma omp teams distribute num_teams(argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute num_teams (argc + argc) +#pragma omp teams distribute num_teams (argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp index 1171807fdb9..0c8a2e6108d 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp index 2664b9df953..1c18f855907 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp index efc139d84ad..2c466239850 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp index e0abe1114fb..27ff4125daf 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp index 922658e6dd8..b6fac35b765 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target @@ -116,7 +116,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for firstprivate(da) +#pragma omp teams distribute parallel for firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target 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 e92dc65c60a..6f724b05017 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -45,7 +45,7 @@ int tmain(T argc, S **argv) { #pragma omp teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for if(argc) +#pragma omp teams distribute parallel for if(argc+z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -76,7 +76,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -123,7 +123,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for if(parallel : argc) +#pragma omp teams distribute parallel for if(parallel : argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp teams distribute parallel for'}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp index 22d8e6ad71b..56f4bc0260e 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp index 42dc92e3cec..2e1be8f9f6f 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_messages.cpp index b8617838420..906c3304286 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp index cc6f1c8e640..2f34c8b60fa 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute parallel for num_teams(C) for (int i=0; i<100; i++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for num_teams(argc + argc) +#pragma omp teams distribute parallel for num_teams(argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for num_teams (argc + argc) +#pragma omp teams distribute parallel for num_teams (argc + argc - z) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp index 5b22861f8ed..9b24c3099cb 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp index 33e9c39be90..56d5c45e898 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp index cc7a4c668bf..beebe84e6df 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -80,7 +80,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -197,7 +197,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -261,7 +261,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} +#pragma omp teams distribute parallel for reduction(^ : z, fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp index e8cda672c09..8c8fa77ea02 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N, int ST> // expected-note {{declared here}} T tmain(T argc, S **argv) { + T k; // expected-error@+2 {{expected '(' after 'schedule'}} #pragma omp target #pragma omp teams distribute parallel for schedule @@ -85,7 +86,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target -#pragma omp teams distribute parallel for schedule (dynamic, 1) +#pragma omp teams distribute parallel for schedule (dynamic, k) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp index 90edfb1b11f..faa2b200e6d 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp index a8f14cb61f2..206540af6e2 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp index 31611c7ff01..032ab9c4495 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp index 4de844737a4..93017a8233f 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp index d53fa578b5c..cbd4ec4ce97 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1*z) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z>>1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp index 182c21423a7..87098ca45a6 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target @@ -108,7 +108,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd firstprivate(ba) +#pragma omp teams distribute parallel for simd firstprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target 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 d8a642300d7..c01e6e87e39 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 @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -33,7 +33,7 @@ int tmain(T argc, S **argv) { #pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}} +#pragma omp teams distribute parallel for simd if (foobool(argc)*z), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd if (S) // expected-error {{'S' does not refer to a value}} @@ -76,7 +76,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -90,7 +90,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} +#pragma omp teams distribute parallel for simd if (argc/z)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp index d0f6775c571..fe70da5b419 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp teams distribute parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -159,7 +159,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -186,7 +186,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(argc) +#pragma omp teams distribute parallel for simd lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp index 44e42c624df..f79a9986d20 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp index a1c92807369..2fae965da80 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp index e95ddfc6690..c07cef18610 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp index 5e4ce0c8647..c18890ff90c 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T k; #pragma omp target #pragma omp teams distribute parallel for simd num_teams(C) for (int i=0; i<100; i++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_teams(argc + argc) +#pragma omp teams distribute parallel for simd num_teams(argc + k) for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int k; #pragma omp target #pragma omp teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_teams (argc + argc) +#pragma omp teams distribute parallel for simd num_teams (argc + k) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp index 1f9b61e4643..6ff5db319a9 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, typename S, int N> // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target #pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); @@ -27,7 +27,7 @@ T tmain(T argc, S **argv) { #pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} +#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} @@ -52,7 +52,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target #pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); @@ -66,7 +66,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} +#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp index 9d4ca03f9e4..689d6c8151a 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -34,7 +34,7 @@ class S4 { public: S4(int v):a(v) { } }; -class S5 { +class S5 { int a; S5():a(0) {} // expected-note {{implicitly declared private here}} public: diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp index 459f40f494c..c61c0984b50 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp index 82854a7cb68..feb31286b85 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -80,7 +80,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -197,7 +197,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -237,7 +237,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(&& : argc) +#pragma omp teams distribute parallel for simd reduction(&& : argc, z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp index 2b31c896348..3e455d29348 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp index 90f3cf46b90..2eefa1ee198 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp index 2b31c896348..3e455d29348 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp index b5a95760eb0..6d0cfaa7800 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute parallel for simd thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd thread_limit(argc + argc) +#pragma omp teams distribute parallel for simd thread_limit(argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd thread_limit (argc + argc) +#pragma omp teams distribute parallel for simd thread_limit (argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp index ad37b5389c6..85aa33a7b62 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute parallel for thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for thread_limit(argc + argc) +#pragma omp teams distribute parallel for thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for thread_limit (argc + argc) +#pragma omp teams distribute parallel for thread_limit (argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_private_messages.cpp b/clang/test/OpenMP/teams_distribute_private_messages.cpp index 130cbd5c57c..8654bbf3b6b 100644 --- a/clang/test/OpenMP/teams_distribute_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/teams_distribute_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_reduction_messages.cpp index 6b209c7797e..9e1ed32fc31 100644 --- a/clang/test/OpenMP/teams_distribute_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -135,7 +135,7 @@ T tmain(T argc) { #pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} +#pragma omp teams distribute reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} @@ -203,7 +203,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -303,7 +303,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : fl) +#pragma omp teams distribute reduction(+ : fl, z) for (int j=0; j<100; j++) foo(); static int m; #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_shared_messages.cpp index b1828eb43c4..452d017b5d1 100644 --- a/clang/test/OpenMP/teams_distribute_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp index f745aaad7fd..955a2b5a824 100644 --- a/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp index a5eb6d20e02..75c7c619022 100644 --- a/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_simd_default_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_default_messages.cpp index 8f6db01efb3..2775210ae04 100644 --- a/clang/test/OpenMP/teams_distribute_simd_default_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp index 3eb0db923b8..42479757683 100644 --- a/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp index 8ea499f2f8c..f9818964aeb 100644 --- a/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, k; int &j = i; #pragma omp target @@ -100,7 +100,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp teams distribute simd firstprivate (k, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp index 3a7f0d2f4cf..bad64fac08d 100644 --- a/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template <class I, class C> int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target -#pragma omp teams distribute simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp teams distribute simd lastprivate(k, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -159,7 +159,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -206,7 +206,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd lastprivate(ba) +#pragma omp teams distribute simd lastprivate(ba, k) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp index 91b358f5ceb..601d4ddf25b 100644 --- a/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp index 777f0812ce4..c463560a46b 100644 --- a/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/clang/test/OpenMP/teams_distribute_simd_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_messages.cpp index 7a99e3f352f..faaf16a23da 100644 --- a/clang/test/OpenMP/teams_distribute_simd_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp index 86164642b82..25ef0f32dda 100644 --- a/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute simd num_teams(C) for (int i=0; i<100; i++) foo(); @@ -42,7 +43,7 @@ T tmain(T argc) { #pragma omp teams distribute simd num_teams(argc + argc) for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}} +#pragma omp teams distribute simd num_teams(argc + z), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute simd num_teams(S1) // expected-error {{'S1' does not refer to a value}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute simd num_teams (argc + argc) +#pragma omp teams distribute simd num_teams (argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp index 7ffdf86e3c5..88a6848e431 100644 --- a/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -34,7 +34,7 @@ class S4 { public: S4(int v):a(v) { } }; -class S5 { +class S5 { int a; S5():a(0) {} // expected-note {{implicitly declared private here}} public: diff --git a/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp index 826de052197..56935ed8ac9 100644 --- a/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -80,7 +80,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -156,7 +156,7 @@ T tmain(T argc) { #pragma omp teams distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} +#pragma omp teams distribute simd reduction(+ : z, o) // expected-error 2 {{no viable overloaded '='}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} @@ -197,7 +197,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -237,7 +237,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(&& : argc) +#pragma omp teams distribute simd reduction(&& : argc, z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp index a3ea61e1da1..0a2ccf3da8e 100644 --- a/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp index b29e2bb8557..81f7e2a6636 100644 --- a/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams distribute simd shared // expected-error {{expected '(' after 'shared'}} @@ -101,7 +101,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd shared(da) for (int j=0; j<100; j++) foo(); #pragma omp target - #pragma omp teams distribute simd shared(e, g) + #pragma omp teams distribute simd shared(e, g, z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}} diff --git a/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp index a3ea61e1da1..0a2ccf3da8e 100644 --- a/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp index 732bb344735..e2b30ef2e8f 100644 --- a/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute simd thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd thread_limit(argc + argc) +#pragma omp teams distribute simd thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd thread_limit (argc + argc) +#pragma omp teams distribute simd thread_limit (argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp index d22cc25b5b5..14ccbc29d8b 100644 --- a/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute thread_limit(argc + argc) +#pragma omp teams distribute thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute thread_limit (argc + argc) +#pragma omp teams distribute thread_limit (argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_firstprivate_messages.cpp b/clang/test/OpenMP/teams_firstprivate_messages.cpp index 9bc5eeac6e3..ff58f42994d 100644 --- a/clang/test/OpenMP/teams_firstprivate_messages.cpp +++ b/clang/test/OpenMP/teams_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -65,7 +65,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -98,7 +98,7 @@ int main(int argc, char **argv) { #pragma omp teams firstprivate(argv[1]) // expected-error {{expected variable name}} foo(); #pragma omp target -#pragma omp teams firstprivate(ba) +#pragma omp teams firstprivate(ba, z) foo(); #pragma omp target #pragma omp teams firstprivate(ca) diff --git a/clang/test/OpenMP/teams_messages.cpp b/clang/test/OpenMP/teams_messages.cpp index bba7da2e0e3..b01c428118c 100644 --- a/clang/test/OpenMP/teams_messages.cpp +++ b/clang/test/OpenMP/teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/clang/test/OpenMP/teams_num_teams_messages.cpp b/clang/test/OpenMP/teams_num_teams_messages.cpp index 47b2b4eafe3..40da396b010 100644 --- a/clang/test/OpenMP/teams_num_teams_messages.cpp +++ b/clang/test/OpenMP/teams_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams num_teams(C) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); #pragma omp target -#pragma omp teams num_teams(argc + argc) +#pragma omp teams num_teams(argc + argc+z) foo(); #pragma omp target #pragma omp teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams num_teams // expected-error {{expected '(' after 'num_teams'}} foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target -#pragma omp teams num_teams (argc + argc) +#pragma omp teams num_teams (argc + argc-z) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_private_messages.cpp b/clang/test/OpenMP/teams_private_messages.cpp index 5cc8a7a8051..faabbb3aa14 100644 --- a/clang/test/OpenMP/teams_private_messages.cpp +++ b/clang/test/OpenMP/teams_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/clang/test/OpenMP/teams_reduction_messages.cpp b/clang/test/OpenMP/teams_reduction_messages.cpp index d9219cfbbbd..73cce700dea 100644 --- a/clang/test/OpenMP/teams_reduction_messages.cpp +++ b/clang/test/OpenMP/teams_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -132,7 +132,7 @@ T tmain(T argc) { #pragma omp teams reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); #pragma omp target -#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target #pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -216,7 +216,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -295,7 +295,7 @@ int main(int argc, char **argv) { #pragma omp teams reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp teams reduction(+ : z, o) // expected-error {{no viable overloaded '='}} foo(); #pragma omp target #pragma omp teams private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} diff --git a/clang/test/OpenMP/teams_shared_messages.cpp b/clang/test/OpenMP/teams_shared_messages.cpp index a83b82f37f3..aa7964fbd2a 100644 --- a/clang/test/OpenMP/teams_shared_messages.cpp +++ b/clang/test/OpenMP/teams_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams shared // expected-error {{expected '(' after 'shared'}} @@ -101,7 +101,7 @@ int main(int argc, char **argv) { #pragma omp teams shared(da) foo(); #pragma omp target - #pragma omp teams shared(e, g) + #pragma omp teams shared(e, g, z) foo(); #pragma omp target #pragma omp teams shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}} diff --git a/clang/test/OpenMP/teams_thread_limit_messages.cpp b/clang/test/OpenMP/teams_thread_limit_messages.cpp index 0c5a22cf303..cc42c97ad8a 100644 --- a/clang/test/OpenMP/teams_thread_limit_messages.cpp +++ b/clang/test/OpenMP/teams_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template <typename T, int C> // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams thread_limit(C) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); #pragma omp target -#pragma omp teams thread_limit(argc + argc) +#pragma omp teams thread_limit(argc + argc + z) foo(); #pragma omp target #pragma omp teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams thread_limit // expected-error {{expected '(' after 'thread_limit'}} foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target -#pragma omp teams thread_limit (argc + argc) +#pragma omp teams thread_limit (argc + argc - z) foo(); #pragma omp target |