summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
diff options
context:
space:
mode:
authorKelvin Li <kkwli0@gmail.com>2017-01-03 05:23:48 +0000
committerKelvin Li <kkwli0@gmail.com>2017-01-03 05:23:48 +0000
commitbe92cc306b8a627a22ca38564c74dc701409023c (patch)
tree99d387f0c9233827163ccdc84ffe70e65ba67d1a /test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
parentc064de96df69e3bc3686f9e554bf0a92f5fe9a9c (diff)
[OpenMP] Sema and parsing for 'target teams distribute parallel for simd’ pragma
This patch is to implement sema and parsing for 'target teams distribute parallel for simd’ pragma. Differential Revision: https://reviews.llvm.org/D28202 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp')
-rw-r--r--test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
new file mode 100644
index 0000000000..4c65130b9d
--- /dev/null
+++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+
+void foo() {
+}
+
+int main(int argc, char **argv) {
+ int i;
+#pragma omp target teams distribute parallel for simd nowait( // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for simd nowait (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for simd nowait device (-10u)
+ for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for simd nowait (3.14) device (-10u) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+
+ return 0;
+}