2 ! { dg-require-effective-target fortran_large_int }
3 ! Take the pack intrinsic through its paces, with all types that are
7 integer,parameter :: k
= selected_int_kind (range (0_8) + 1)
9 integer(kind
=k
), dimension(3,3) :: ik
10 integer(kind
=k
), dimension(9) :: vik
11 integer(kind
=k
), dimension(9) :: rik
13 vik
= (/(i
+10,i
=1,9)/)
14 ik
= reshape((/1_k
, -1_k
, 2_k
, -2_k
, 3_k
, -3_k
, 4_k
, -4_k
, 5_k
/), shape(ik
))
15 rik
= pack(ik
,ik
>0,vik
)
16 if (any(rik
/= (/1_k
, 2_k
, 3_k
, 4_k
, 5_k
, 16_k
, 17_k
, 18_k
, 19_k
/))) &