2 ! Tests that the in-memory representation of a transferred variable
7 integer, parameter :: ip1
= 42
8 integer, parameter :: ip2
= transfer(transfer(ip1
, .true
.), 0)
12 if (ip2
.ne
. ip1
) call abort ()
14 i
= transfer(transfer(ip1
, .true
.), 0)
15 if (i
.ne
. ip1
) call abort ()
18 i
= transfer(transfer(i
, .true
.), 0)
19 if (i
.ne
. ip1
) call abort ()
21 b
= transfer(transfer(.true
., 3.1415), .true
.)
22 if (.not
.b
) call abort ()
24 b
= transfer(transfer(.false
., 3.1415), .true
.)
28 b
= transfer(i
, .true
.)
29 ! The standard doesn't guarantee here that b will be .false.,
30 ! though in gfortran for all targets it will.
32 ai
= (/ 42, 42, 42, 42 /)
33 ai
= transfer (transfer (ai
, .false
., 4), ai
)
34 if (any(ai
.ne
. 42)) call abort
36 ai
= transfer (transfer ((/ 42, 42, 42, 42 /), &
37 & (/ .false
., .false
., .false
., .false
. /)), ai
)
38 if (any(ai
.ne
. 42)) call abort