diff options
Diffstat (limited to 'clang/test/OpenMP/simd_loop_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/simd_loop_messages.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/clang/test/OpenMP/simd_loop_messages.cpp b/clang/test/OpenMP/simd_loop_messages.cpp index 4c4ce5f98c2..81340203748 100644 --- a/clang/test/OpenMP/simd_loop_messages.cpp +++ b/clang/test/OpenMP/simd_loop_messages.cpp @@ -1,5 +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 static int sii; // expected-note@+1 {{defined as threadprivate or thread local}} @@ -239,12 +241,22 @@ int test_iteration_spaces() { for (ii = 0; (ii < 10); (ii-=0)) c[ii] = a[ii]; - // expected-note@+2 {{defined as private}} - // expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may not be private, predetermined as linear}} +#ifndef OMP50 + // expected-note@+3 {{defined as private}} + // expected-error@+3 {{loop iteration variable in the associated loop of 'omp simd' directive may not be private, predetermined as linear}} +#endif // OMP50 #pragma omp simd private(ii) for (ii = 0; ii < 10; ii++) c[ii] = a[ii]; +#ifndef OMP50 + // expected-note@+3 {{defined as lastprivate}} + // expected-error@+3 {{loop iteration variable in the associated loop of 'omp simd' directive may not be lastprivate, predetermined as linear}} +#endif // OMP50 + #pragma omp simd lastprivate(ii) + for (ii = 0; ii < 10; ii++) + c[ii] = a[ii]; + // expected-error@+1 {{unexpected OpenMP clause 'shared' in directive '#pragma omp simd'}} #pragma omp simd shared(ii) for (ii = 0; ii < 10; ii++) |