diff options
Diffstat (limited to 'test/OpenMP/distribute_simd_loop_messages.cpp')
-rw-r--r-- | test/OpenMP/distribute_simd_loop_messages.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/OpenMP/distribute_simd_loop_messages.cpp b/test/OpenMP/distribute_simd_loop_messages.cpp index 1977ca789dcf9..b46bdad0b6414 100644 --- a/test/OpenMP/distribute_simd_loop_messages.cpp +++ b/test/OpenMP/distribute_simd_loop_messages.cpp @@ -135,9 +135,9 @@ int test_iteration_spaces() { for (int i = 0; !!i; i++) c[i] = a[i]; + // Ok #pragma omp target #pragma omp teams - // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} #pragma omp distribute simd for (int i = 0; i != 1; i++) c[i] = a[i]; @@ -472,7 +472,7 @@ int test_with_random_access_iterator() { #pragma omp target #pragma omp teams #pragma omp distribute simd - for (GoodIter I = begin; I < end; ++I) + for (GoodIter I = begin; I < end; ++I) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams @@ -483,41 +483,41 @@ int test_with_random_access_iterator() { #pragma omp target #pragma omp teams #pragma omp distribute simd - for (GoodIter I = begin; I >= end; --I) + for (GoodIter I = begin; I >= end; --I) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp distribute simd - for (GoodIter I(begin); I < end; ++I) + for (GoodIter I(begin); I < end; ++I) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp distribute simd - for (GoodIter I(nullptr); I < end; ++I) + for (GoodIter I(nullptr); I < end; ++I) // expected-warning {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp distribute simd - for (GoodIter I(0); I < end; ++I) + for (GoodIter I(0); I < end; ++I) // expected-warning {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp distribute simd - for (GoodIter I(1,2); I < end; ++I) + for (GoodIter I(1,2); I < end; ++I) // expected-warning {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams #pragma omp distribute simd - for (begin = GoodIter(0); begin < end; ++begin) + for (begin = GoodIter(0); begin < end; ++begin) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++begin; #pragma omp target #pragma omp teams #pragma omp distribute simd - for (begin = GoodIter(1,2); begin < end; ++begin) + for (begin = GoodIter(1,2); begin < end; ++begin) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++begin; #pragma omp target #pragma omp teams @@ -528,7 +528,7 @@ int test_with_random_access_iterator() { #pragma omp target #pragma omp teams #pragma omp distribute simd - for (begin = end; begin < end; ++begin) + for (begin = end; begin < end; ++begin) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++begin; #pragma omp target #pragma omp teams @@ -558,7 +558,7 @@ int test_with_random_access_iterator() { #pragma omp target #pragma omp teams #pragma omp distribute simd - for (GoodIter I = begin; I >= end; I = I - 1) + for (GoodIter I = begin; I >= end; I = I - 1) // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target #pragma omp teams @@ -582,7 +582,7 @@ int test_with_random_access_iterator() { #pragma omp target #pragma omp teams #pragma omp distribute simd - for (Iter0 I = begin0; I < end0; ++I) + for (Iter0 I = begin0; I < end0; ++I) // expected-warning 2 {{Non-trivial type 'Iter0' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; #pragma omp target @@ -590,7 +590,7 @@ int test_with_random_access_iterator() { // Initializer is constructor without params. // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}} #pragma omp distribute simd - for (Iter0 I; I < end0; ++I) + for (Iter0 I; I < end0; ++I) // expected-warning {{Non-trivial type 'Iter0' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; Iter1 begin1, end1; @@ -636,7 +636,7 @@ template <typename IT, int ST> class TC { // expected-note@+3 {{loop step is expected to be positive due to this condition}} // expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}} #pragma omp distribute simd - for (IT I = begin; I <= end; I += ST) { + for (IT I = begin; I <= end; I += ST) { // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; } #pragma omp distribute simd @@ -679,7 +679,7 @@ template <typename IT, int ST=0> int dotest_gt(IT begin, IT end) { #pragma omp target #pragma omp teams #pragma omp distribute simd - for (IT I = begin; I < end; I+=TC<int,ST>::step()) { + for (IT I = begin; I < end; I+=TC<int,ST>::step()) { // expected-warning 2 {{Non-trivial type 'GoodIter' is mapped, only trivial types are guaranteed to be mapped correctly}} ++I; } } @@ -688,7 +688,7 @@ void test_with_template() { GoodIter begin, end; TC<GoodIter, 100> t1; TC<GoodIter, -100> t2; - t1.dotest_lt(begin, end); + t1.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, 100>::dotest_lt' requested here}} t2.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, -100>::dotest_lt' requested here}} dotest_gt(begin, end); // expected-note {{in instantiation of function template specialization 'dotest_gt<GoodIter, 0>' requested here}} dotest_gt<unsigned, 10>(0, 100); // expected-note {{in instantiation of function template specialization 'dotest_gt<unsigned int, 10>' requested here}} |