2010-12-20 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / internal_pack_3.f90
blob08f3c7d15edde491d9a25cf5f6137cbcdedd61c9
1 ! { dg-do run }
2 ! { dg-require-effective-target fortran_large_int }
3 ! Test that the internal pack and unpack routines work OK
4 ! for our large integer type.
6 program main
7 integer,parameter :: k = selected_int_kind (range (0_8) + 1)
8 integer(kind=k), dimension(3) :: ik
10 ik = (/ -1, 1, -3 /)
11 call sub_ik(ik(1:3:2))
12 if (any(ik /= (/ 3, 1, 2 /))) call abort
13 end program main
15 subroutine sub_ik(i)
16 integer,parameter :: k = selected_int_kind (range (0_8) + 1)
17 integer(kind=k), dimension(2) :: i
18 if (i(1) /= -1) call abort
19 if (i(2) /= -3) call abort
20 i(1) = 3
21 i(2) = 2
22 end subroutine sub_ik