1 ! Test 'allocatable' with OpenACC data clauses.
3 ! See also '../libgomp.fortran/target-allocatable-1-1.f90'.
6 ! { dg-additional-options "-cpp" }
10 integer, allocatable
:: a
, b
, c
, d
, e
15 b
= 25 ! Implicit allocation.
17 c
= 52 ! Implicit allocation.
19 !No 'allocate (d)' here.
21 !No 'allocate (e)' here.
23 !$acc parallel copyin(a) copy(b, c, d) copyout(e)
25 if (.not
. allocated (a
)) stop 1
29 if (.not
. allocated (b
)) stop 3
32 if (.not
. allocated (c
)) stop 5
36 if (allocated (d
)) stop 7
37 d
= 42 ! Implicit allocation, but on device only.
38 if (.not
. allocated (d
)) stop 8
39 deallocate (d
) ! OpenMP requires must be "unallocated upon exit from the region".
41 if (allocated (e
)) stop 9
42 e
= 24 ! Implicit allocation, but on device only.
43 if (.not
. allocated (e
)) stop 10
44 deallocate (e
) ! OpenMP requires must be "unallocated upon exit from the region".
48 if (.not
. allocated (a
)) stop 20
50 if (a
.ne
. 33) stop 21
52 if (a
.ne
. 11) stop 22
56 if (.not
. allocated (b
)) stop 23
57 if (b
.ne
. 25) stop 24
60 if (.not
. allocated (c
)) stop 25
61 if (c
.ne
. 10) stop 26
64 if (allocated (d
)) stop 27
66 if (allocated (e
)) stop 28