1 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 -ast-print %s | FileCheck %s
2 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -emit-pch -o %t %s
3 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
5 // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=50 -ast-print %s | FileCheck %s
6 // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
9 // RUN: %clang_cc1 -DOMP51 -verify -fopenmp -ast-print %s | FileCheck -check-prefixes=CHECK,OMP51 %s
10 // RUN: %clang_cc1 -DOMP51 -fopenmp -emit-pch -o %t %s
11 // RUN: %clang_cc1 -DOMP51 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck -check-prefixes=CHECK,OMP51 %s
13 // RUN: %clang_cc1 -DOMP51 -verify -fopenmp-simd -ast-print %s | FileCheck -check-prefixes=CHECK,OMP51 %s
14 // RUN: %clang_cc1 -DOMP51 -fopenmp-simd -emit-pch -o %t %s
15 // RUN: %clang_cc1 -DOMP51 -fopenmp-simd -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck -check-prefixes=CHECK,OMP51 %s
17 // RUN: %clang_cc1 -DOMP52 -verify -fopenmp -fopenmp-version=52 -ast-print %s | FileCheck -check-prefixes=CHECK,OMP52 %s
18 // RUN: %clang_cc1 -DOMP52 -fopenmp -fopenmp-version=52 -emit-pch -o %t %s
19 // RUN: %clang_cc1 -DOMP52 -fopenmp -fopenmp-version=52 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck -check-prefixes=CHECK,OMP52 %s
21 // RUN: %clang_cc1 -DOMP52 -verify -fopenmp-simd -fopenmp-version=52 -ast-print %s | FileCheck -check-prefixes=CHECK,OMP52 %s
22 // RUN: %clang_cc1 -DOMP52 -fopenmp-simd -fopenmp-version=52 -emit-pch -o %t %s
23 // RUN: %clang_cc1 -DOMP52 -fopenmp-simd -fopenmp-version=52 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck -check-prefixes=CHECK,OMP52 %s
24 // expected-no-diagnostics
29 // CHECK: struct vec {
36 // CHECK: struct dat {
40 #pragma omp declare mapper(id: struct vec v) map(v.len)
41 // CHECK: #pragma omp declare mapper (id : struct vec v) map(tofrom: v.len){{$}}
45 #pragma omp declare mapper(id: struct vec v) map(v.len)
46 // CHECK: #pragma omp declare mapper (id : struct vec v) map(tofrom: v.len){{$}}
47 #pragma omp declare mapper(default : struct vec kk) map(kk.len) map(kk.data[0:2])
48 // CHECK: #pragma omp declare mapper (default : struct vec kk) map(tofrom: kk.len) map(tofrom: kk.data[0:2]){{$}}
49 #pragma omp declare mapper(struct dat d) map(to: d.d)
50 // CHECK: #pragma omp declare mapper (default : struct dat d) map(to: d.d){{$}}
52 // CHECK: int main(void) {
54 #pragma omp declare mapper(id: struct vec v) map(v.len)
55 // CHECK: #pragma omp declare mapper (id : struct vec v) map(tofrom: v.len)
57 #pragma omp declare mapper(id: struct vec v) map(v.len)
58 // CHECK: #pragma omp declare mapper (id : struct vec v) map(tofrom: v.len)
61 #pragma omp target map(mapper(id), alloc: vv)
62 // CHECK: #pragma omp target map(mapper(id),alloc: vv)
64 #pragma omp target map(mapper(default), from: dd[0:10])
65 // CHECK: #pragma omp target map(mapper(default),from: dd[0:10])
67 #pragma omp target update to(mapper(id): vv) from(mapper(default): dd[0:10])
68 // CHECK: #pragma omp target update to(mapper(id): vv) from(mapper(default): dd[0:10])
70 #pragma omp target update to(mapper(id) present: vv) from(mapper(default), present: dd[0:10])
71 // OMP51: #pragma omp target update to(mapper(id), present: vv) from(mapper(default), present: dd[0:10])
72 #pragma omp target update to(present mapper(id): vv) from(present, mapper(default): dd[0:10])
73 // OMP51: #pragma omp target update to(present, mapper(id): vv) from(present, mapper(default): dd[0:10])
77 #pragma omp declare mapper(id1: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it])
78 // OMP52: #pragma omp declare mapper (id1 : struct vec vvec) map(iterator(int it = 0:vvec.len:2),tofrom: vvec.data[it]);