Home | History | Annotate | Download | only in OpenMP
      1 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
      2 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s
      3 
      4 int main(int argc, char **argv) {
      5 
      6   int r;
      7   #pragma omp target enter data // expected-error {{expected at least one map clause for '#pragma omp target enter data'}}
      8 
      9   #pragma omp target enter data map(r) // expected-error {{map type must be specified for '#pragma omp target enter data'}}
     10   #pragma omp target enter data map(tofrom: r) // expected-error {{map type 'tofrom' is not allowed for '#pragma omp target enter data'}}
     11 
     12   #pragma omp target enter data map(always, to: r)
     13   #pragma omp target enter data map(always, alloc: r)
     14   #pragma omp target enter data map(always, from: r) // expected-error {{map type 'from' is not allowed for '#pragma omp target enter data'}}
     15   #pragma omp target enter data map(release: r) // expected-error {{map type 'release' is not allowed for '#pragma omp target enter data'}}
     16   #pragma omp target enter data map(delete: r) // expected-error {{map type 'delete' is not allowed for '#pragma omp target enter data'}}
     17 
     18   return 0;
     19 }
     20