summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/task_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-03-17 10:19:46 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-03-17 10:19:46 +0000
commita839dddf9232b652a26c55b4a6ce3f757ae8ab46 (patch)
tree1d2ab393bbca6914e76ffd5b445ff8d7cedc768b /clang/test/OpenMP/task_messages.cpp
parentb59b488e21f7ba968aed86b216024bd490b4daea (diff)
downloadbcm5719-llvm-a839dddf9232b652a26c55b4a6ce3f757ae8ab46.tar.gz
bcm5719-llvm-a839dddf9232b652a26c55b4a6ce3f757ae8ab46.zip
[OPENMP 4.0] Use 'declare reduction' constructs in 'reduction' clauses.
OpenMP 4.0 allows to define custom reduction operations using '#pragma omp declare reduction' construct. Patch allows to use this custom defined reduction operations in 'reduction' clauses. llvm-svn: 263701
Diffstat (limited to 'clang/test/OpenMP/task_messages.cpp')
-rw-r--r--clang/test/OpenMP/task_messages.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/test/OpenMP/task_messages.cpp b/clang/test/OpenMP/task_messages.cpp
index 64bf8a40f02..f42a37ae1da 100644
--- a/clang/test/OpenMP/task_messages.cpp
+++ b/clang/test/OpenMP/task_messages.cpp
@@ -60,11 +60,10 @@ int foo() {
// expected-error@+1 2 {{calling a private constructor of class 'S'}}
#pragma omp parallel shared(a, b)
++a, ++b;
-// expected-note@+1 3 {{defined as reduction}}
+// expected-note@+1 2 {{defined as reduction}}
#pragma omp parallel reduction(+ : r)
-// expected-error@+1 {{argument of a reduction clause of a parallel construct must not appear in a firstprivate clause on a task construct}}
+// expected-error@+1 2 {{argument of a reduction clause of a parallel construct must not appear in a firstprivate clause on a task construct}}
#pragma omp task firstprivate(r)
- // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
++r;
// expected-note@+1 2 {{defined as reduction}}
#pragma omp parallel reduction(+ : r)
@@ -77,12 +76,11 @@ int foo() {
// expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
++r;
#pragma omp parallel
-// expected-note@+1 3 {{defined as reduction}}
+// expected-note@+1 2 {{defined as reduction}}
#pragma omp for reduction(+ : r)
for (int i = 0; i < 10; ++i)
-// expected-error@+1 {{argument of a reduction clause of a for construct must not appear in a firstprivate clause on a task construct}}
+// expected-error@+1 2 {{argument of a reduction clause of a for construct must not appear in a firstprivate clause on a task construct}}
#pragma omp task firstprivate(r)
- // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
++r;
#pragma omp parallel
// expected-note@+1 2 {{defined as reduction}}
OpenPOWER on IntegriCloud