summaryrefslogtreecommitdiff
path: root/test/OpenMP/target_data_messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/target_data_messages.c')
-rw-r--r--test/OpenMP/target_data_messages.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/OpenMP/target_data_messages.c b/test/OpenMP/target_data_messages.c
index cd60d85a9030..153b4377290c 100644
--- a/test/OpenMP/target_data_messages.c
+++ b/test/OpenMP/target_data_messages.c
@@ -3,19 +3,22 @@
void foo() { }
int main(int argc, char **argv) {
+ int a;
+ #pragma omp target data // expected-error {{expected at least one map clause for '#pragma omp target data'}}
+ {}
L1:
foo();
- #pragma omp target data
+ #pragma omp target data map(a)
{
foo();
goto L1; // expected-error {{use of undeclared label 'L1'}}
}
goto L2; // expected-error {{use of undeclared label 'L2'}}
- #pragma omp target data
+ #pragma omp target data map(a)
L2:
foo();
- #pragma omp target data(i) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}}
+ #pragma omp target data map(a)(i) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}}
{
foo();
}