diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/OpenMP/simd_loop_messages.cpp | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'test/OpenMP/simd_loop_messages.cpp')
-rw-r--r-- | test/OpenMP/simd_loop_messages.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/OpenMP/simd_loop_messages.cpp b/test/OpenMP/simd_loop_messages.cpp index bd7dd5b..96b4caf 100644 --- a/test/OpenMP/simd_loop_messages.cpp +++ b/test/OpenMP/simd_loop_messages.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s static int sii; +// expected-note@+1 {{defined as threadprivate or thread local}} #pragma omp threadprivate(sii) static int globalii; @@ -45,32 +46,32 @@ int test_iteration_spaces() { for (double fi = 0; fi < 10.0; fi++) { c[(int)fi] = a[(int)fi] + b[(int)fi]; } - // expected-error@+2 {{variable must be of integer or random access iterator type}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (int &ref = ii; ref < 10; ref++) { } - // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (int i; i < 10; i++) c[i] = a[i]; - // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (int i = 0, j = 0; i < 10; ++i) c[i] = a[i]; - // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (;ii < 10; ++ii) c[ii] = a[ii]; // expected-warning@+3 {{expression result unused}} - // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (ii + 1;ii < 10; ++ii) c[ii] = a[ii]; - // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (c[ii] = 0;ii < 10; ++ii) c[ii] = a[ii]; @@ -252,6 +253,7 @@ int test_iteration_spaces() { #pragma omp parallel { +// expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may not be threadprivate or thread local, predetermined as linear}} #pragma omp simd for (sii = 0; sii < 10; sii+=1) c[sii] = a[sii]; @@ -364,7 +366,7 @@ int test_with_random_access_iterator() { #pragma omp simd for (GoodIter I = begin; I < end; ++I) ++I; - // expected-error@+2 {{variable must be of integer or random access iterator type}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (GoodIter &I = begin; I < end; ++I) ++I; @@ -393,7 +395,7 @@ int test_with_random_access_iterator() { #pragma omp simd for (begin = GoodIter(1,2); begin < end; ++begin) ++begin; - // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}} + // expected-error@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp simd for (++begin; begin < end; ++begin) ++begin; |