| 1 | // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s |
| 2 | |
| 3 | // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s |
| 4 | |
| 5 | void foo() { } |
| 6 | |
| 7 | int main(int argc, char **argv) { |
| 8 | int a; |
| 9 | #pragma omp target data // expected-error {{expected at least one 'map' or 'use_device_ptr' clause for '#pragma omp target data'}} |
| 10 | {} |
| 11 | L1: |
| 12 | foo(); |
| 13 | #pragma omp target data map(a) allocate(a) // expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp target data'}} |
| 14 | { |
| 15 | foo(); |
| 16 | goto L1; // expected-error {{use of undeclared label 'L1'}} |
| 17 | } |
| 18 | goto L2; // expected-error {{use of undeclared label 'L2'}} |
| 19 | #pragma omp target data map(a) |
| 20 | L2: |
| 21 | foo(); |
| 22 | |
| 23 | #pragma omp target data map(a)(i) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}} |
| 24 | { |
| 25 | foo(); |
| 26 | } |
| 27 | #pragma omp target unknown // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}} |
| 28 | { |
| 29 | foo(); |
| 30 | } |
| 31 | return 0; |
| 32 | } |
| 33 | |