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/OpenMP/parallel_for_simd_reduction_messages.cpp | |
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/OpenMP/parallel_for_simd_reduction_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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}} |