diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /test/OpenMP/parallel_for_misc_messages.c | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'test/OpenMP/parallel_for_misc_messages.c')
-rw-r--r-- | test/OpenMP/parallel_for_misc_messages.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/OpenMP/parallel_for_misc_messages.c b/test/OpenMP/parallel_for_misc_messages.c index b236a61..f07a0f2 100644 --- a/test/OpenMP/parallel_for_misc_messages.c +++ b/test/OpenMP/parallel_for_misc_messages.c @@ -165,6 +165,17 @@ void test_collapse() { #pragma omp parallel for collapse(5 - 5) for (i = 0; i < 16; ++i) ; +// expected-note@+1 {{defined as firstprivate}} +#pragma omp parallel for collapse(2) firstprivate(i) + for (i = 0; i < 16; ++i) +// expected-note@+1 {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp for' directive into a parallel or another task region?}} + for (int j = 0; j < 16; ++j) +// expected-error@+3 {{reduction variable must be shared}} +// expected-error@+2 {{private variable cannot be reduction}} +// expected-error@+1 {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}} +#pragma omp for reduction(+ : i, j) + for (int k = 0; k < 16; ++k) + i += j; } void test_private() { |