URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [in-pack.f90] - Rev 378
Go to most recent revision | Compare with Previous | Blame | View Log
! Check in_pack and in_unpack for integer and comlex types, with! alignment issues thrown in for good measure.program mainimplicit nonecomplex(kind=4) :: a4(5),b4(5),aa4(5),bb4(5)real(kind=4) :: r4(100)equivalence(a4(1),r4(1)),(b4(1),r4(12))complex(kind=8) :: a8(5),b8(5),aa8(5),bb8(5)real(kind=8) :: r8(100)equivalence(a8(1),r8(1)),(b8(1),r8(12))integer(kind=4) :: i4(5),ii4(5)integer(kind=8) :: i8(5),ii8(5)integer :: ia4 = (/(cmplx(i,-i,kind=4),i=1,5)/)b4 = (/(2*cmplx(i,-i,kind=4),i=1,5)/)call csub4(a4(5:1:-1),b4(5:1:-1),5)aa4 = (/(cmplx(5-i+1,i-5-1,kind=4),i=1,5)/)if (any(aa4 /= a4)) call abortbb4 = (/(2*cmplx(5-i+1,i-5-1,kind=4),i=1,5)/)if (any(bb4 /= b4)) call aborta8 = (/(cmplx(i,-i,kind=8),i=1,5)/)b8 = (/(2*cmplx(i,-i,kind=8),i=1,5)/)call csub8(a8(5:1:-1),b8(5:1:-1),5)aa8 = (/(cmplx(5-i+1,i-5-1,kind=8),i=1,5)/)if (any(aa8 /= a8)) call abortbb8 = (/(2*cmplx(5-i+1,i-5-1,kind=8),i=1,5)/)if (any(bb8 /= b8)) call aborti4 = (/(i, i=1,5)/)call isub4(i4(5:1:-1),5)ii4 = (/(5-i+1,i=1,5)/)if (any(ii4 /= i4)) call aborti8 = (/(i,i=1,5)/)call isub8(i8(5:1:-1),5)ii8 = (/(5-i+1,i=1,5)/)if (any(ii8 /= i8)) call abortend program mainsubroutine csub4(a,b,n)implicit nonecomplex(kind=4), dimension(n) :: a,bcomplex(kind=4), dimension(n) :: aa, bbinteger :: n, iaa = (/(cmplx(n-i+1,i-n-1,kind=4),i=1,n)/)if (any(aa /= a)) call abortbb = (/(2*cmplx(n-i+1,i-n-1,kind=4),i=1,5)/)if (any(bb /= b)) call aborta = (/(cmplx(i,-i,kind=4),i=1,5)/)b = (/(2*cmplx(i,-i,kind=4),i=1,5)/)end subroutine csub4subroutine csub8(a,b,n)implicit nonecomplex(kind=8), dimension(n) :: a,bcomplex(kind=8), dimension(n) :: aa, bbinteger :: n, iaa = (/(cmplx(n-i+1,i-n-1,kind=8),i=1,n)/)if (any(aa /= a)) call abortbb = (/(2*cmplx(n-i+1,i-n-1,kind=8),i=1,5)/)if (any(bb /= b)) call aborta = (/(cmplx(i,-i,kind=8),i=1,5)/)b = (/(2*cmplx(i,-i,kind=8),i=1,5)/)end subroutine csub8subroutine isub4(a,n)implicit noneinteger(kind=4), dimension(n) :: ainteger(kind=4), dimension(n) :: aainteger :: n, iaa = (/(n-i+1,i=1,n)/)if (any(aa /= a)) call aborta = (/(i,i=1,5)/)end subroutine isub4subroutine isub8(a,n)implicit noneinteger(kind=8), dimension(n) :: ainteger(kind=8), dimension(n) :: aainteger :: n, iaa = (/(n-i+1,i=1,n)/)if (any(aa /= a)) call aborta = (/(i,i=1,5)/)end subroutine isub8
Go to most recent revision | Compare with Previous | Blame | View Log
