diff options
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() { |