2 ! { dg-require-effective-target fortran_large_real }
3 ! Test that the internal pack and unpack routines work OK
4 ! for our large real type.
8 integer,parameter :: k
= selected_real_kind (precision (0.0_8
) + 1)
9 real(kind
=k
), dimension(3) :: rk
10 complex(kind
=k
), dimension(3) :: ck
12 rk
= (/ -1.0_k
, 1.0_k
, -3.0_k
/)
13 call sub_rk(rk(1:3:2))
14 if (any(rk
/= (/ 3.0_k
, 1.0_k
, 2.0_k
/))) call abort
16 ck
= (/ (-1.0_k
, 0._k
), (1.0_k
, 0._k
), (-3.0_k
, 0._k
) /)
17 call sub_ck(ck(1:3:2))
18 if (any(real(ck
) /= (/ 3.0_k
, 1.0_k
, 2.0_k
/))) call abort
19 if (any(aimag(ck
) /= 0._k
)) call abort
25 integer,parameter :: k
= selected_real_kind (precision (0.0_8
) + 1)
26 real(kind
=k
), dimension(2) :: r
27 if (r(1) /= -1._k
) call abort
28 if (r(2) /= -3._k
) call abort
35 integer,parameter :: k
= selected_real_kind (precision (0.0_8
) + 1)
36 complex(kind
=k
), dimension(2) :: r
37 if (r(1) /= (-1._k
,0._k
)) call abort
38 if (r(2) /= (-3._k
,0._k
)) call abort