2 ! { dg-additional-options "-fdump-tree-gimple" }
6 integer, parameter :: N
= 1000
7 integer :: a(N
), b(N
), c(N
), i
9 ! Should be able to parse 'present' map modifier.
10 !$omp target enter data map (present, to: a, b)
12 !$omp target data map (present, to: a, b) map (always, present, from: c)
13 !$omp target map (present, to: a, b) map (present, from: c)
20 !$omp target exit data map (always, present, from: c)
22 ! Map clauses with 'present' modifier should go ahead of those without.
23 !$omp target map (to: a) map (present, to: b) map (from: c)
30 ! { dg-final { scan-tree-dump "pragma omp target enter data map\\(force_present:a \\\[len: \[0-9\]+\\\]\\) map\\(force_present:b \\\[len: \[0-9\]+\\\]\\)" "gimple" } }
31 ! { dg-final { scan-tree-dump "pragma omp target data map\\(force_present:a \\\[len: \[0-9\]+\\\]\\) map\\(force_present:b \\\[len: \[0-9\]+\\\]\\) map\\(always,present,from:c \\\[len: \[0-9\]+\\\]\\)" "gimple" } }
32 ! { dg-final { scan-tree-dump "pragma omp target.*map\\(force_present:a \\\[len: \[0-9\]+\\\]\\) map\\(force_present:b \\\[len: \[0-9\]+\\\]\\) map\\(force_present:c \\\[len: \[0-9\]+\\\]\\)" "gimple" } }
33 ! { dg-final { scan-tree-dump "pragma omp target exit data map\\(always,present,from:c \\\[len: \[0-9\]+\\\]\\)" "gimple" } }
34 ! { dg-final { scan-tree-dump "pragma omp target.*map\\(force_present:b \\\[len: \[0-9\]+\\\]\\) map\\(to:a \\\[len: \[0-9\]+\\\]\\) map\\(from:c \\\[len: \[0-9\]+\\\]\\)" "gimple" } }