OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [internal_pack_3.f90] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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.
5
 
6
program main
7
  integer,parameter :: k = selected_int_kind (range (0_8) + 1)
8
  integer(kind=k), dimension(3) :: ik
9
 
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
14
 
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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.