1 ! { dg-additional-options "-foffload-options=nvptx-none=-misa=sm_35" { target { offload_target_nvptx } } }
4 !$omp requires reverse_offload
5 integer :: A(50), A2(50), A3(50)
14 !$omp target map(to: shared_mem)
18 !$omp target map(to: A(20:40), A2(20:40), A3(20:40))
22 A(20:40) = -2*A(20:40)
23 A2(20:40) = -9*A2(20:40)
24 A3(20:40) = -13*A3(20:40)
26 !$omp target device (ancestor:1) &
27 !$omp& map(from: A(25:35)) map(always, from: A2(25:35)) &
28 !$omp& map(alloc: A3(25:35)) map(alloc:C(4:8))
30 if (any (A(25:35) /= [(-2*3*i
, i
=25,35)])) stop 1
31 if (any (A2(25:35) /= [(-9*7*i
, i
=25,35)])) stop 2
32 if (any (A3(25:35) /= [(-13*11*i
, i
=25,35)])) stop 3
34 if (any (A(25:35) /= [(3*i
, i
=25,35)])) stop 4
35 if (any (A2(25:35) /= [(7*i
, i
=25,35)])) stop 5
36 if (any (A3(25:35) /= [(11*i
, i
=25,35)])) stop 6
40 A2(25:35) = A2(25:35)*8
41 A3(25:35) = A3(25:35)*18
46 if (any (A(25:35) /= [(-2*3*5*i
, i
=25,35)])) stop 7
47 if (any (A2(25:35) /= [(-9*7*8*i
, i
=25,35)])) stop 8
48 if (any (A3(25:35) /= [(-13*11*18*i
, i
=25,35)])) stop 9
49 if (any (C(4:8) /= [4,5,6,7,8])) stop 10
51 if (any (A(25:35) /= [(-2*3*i
, i
=25,35)])) stop 11
52 if (any (A2(25:35) /= [(7*8*i
, i
=25,35)])) stop 12
53 if (any (A3(25:35) /= [(-13*11*i
, i
=25,35)])) stop 13
54 if (any (C(4:8) /= 88)) stop 14
59 if (any (A(25:35) /= [(-2*3*5*i
, i
=25,35)])) stop
60 if (any (A2(25:35) /= [(-9*7**8*i
, i
=25,35)])) stop
61 if (any (A3(25:35) /= [(-13*11*18*i
, i
=25,35)])) stop
63 if (any (A(25:35) /= [(3*5*i
, i
=25,35)])) stop
64 if (any (A2(25:35) /= [(7*8*i
, i
=25,35)])) stop
65 if (any (A3(25:35) /= [(11*18*i
, i
=25,35)])) stop