2 ! { dg-xfail-run-if "PR92790 - acc declare device_resident - Fortran common blocks not handled" { *-*-* } { "*" } { "-DACC_DEVICE_TYPE_host=1" } }
7 !$acc declare device_resident (b)
10 common /block
/ x
, y
, z
11 !$acc declare device_resident (/block/)
17 integer :: a(5), b(1), c
, vals(7)
18 common /another
/ a
, b
, c
19 !$acc declare device_resident (/another/)
20 if (.not
. acc_is_present (a
)) stop 10
21 if (.not
. acc_is_present (b
)) stop 11
22 if (.not
. acc_is_present (c
)) stop 12
25 ! NOTE: The current (Nov 2019) implementation requires the 'present'
26 ! as it tries to otherwises map the device_resident variables;
27 ! following OpenMP 4.0 semantic: 'a' + 'b' are 'copy' (map fromto) and
28 ! 'c' is firstprivate.
29 !$acc parallel copyout(vals) present(a, b, c)
38 if (.not
. acc_is_present (a
)) stop 13
39 if (.not
. acc_is_present (b
)) stop 14
40 if (.not
. acc_is_present (c
)) stop 15
42 if (any (vals
/= [11,12,13,14,15,16,47])) stop 16
48 integer :: g
, h(3), i(3)
49 common /another
/ g
, h
, i
51 !$acc declare device_resident (/another/)
52 if (.not
. acc_is_present (g
)) stop 20
53 if (.not
. acc_is_present (h
)) stop 21
54 if (.not
. acc_is_present (i
)) stop 22
57 !$acc parallel copyout(val) present(g, h, i)
63 if (.not
. acc_is_present (g
)) stop 23
64 if (.not
. acc_is_present (h
)) stop 24
65 if (.not
. acc_is_present (i
)) stop 25
69 if (any (val
/= [11,12,13,14,15,16,47])) stop 26
83 if (.not
. acc_is_present (b
)) stop 1
84 if (.not
. acc_is_present (x
)) stop 2
85 if (.not
. acc_is_present (y
)) stop 3
86 if (.not
. acc_is_present (z
)) stop 4
91 !$acc parallel copy (a, k)
101 if (.not
. acc_is_present (b
)) stop 5
102 if (.not
. acc_is_present (x
)) stop 6
103 if (.not
. acc_is_present (y
)) stop 7
104 if (.not
. acc_is_present (z
)) stop 8
106 if (a
/= 3.0) stop 30
107 if (k
/= -378) stop 31