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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [iolength_1.f90] - Blame information for rev 745

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

Line No. Rev Author Line
1 695 jeremybenn
! Test that IOLENGTH works for dynamic arrays
2
program iolength_1
3
  implicit none
4
  ! 32 bit, i.e. 4 byte integer (every gcc architecture should have this?)
5
  integer, parameter :: int32 = selected_int_kind(9)
6
  integer(int32), allocatable :: a(:)
7
  integer :: iol, alength
8
  real :: r
9
  call random_number(r)
10
  alength = nint(r*20)
11
  allocate(a(alength))
12
  inquire (iolength = iol) a
13
  if ( 4*alength /= iol) then
14
     call abort
15
  end if
16
end program iolength_1

powered by: WebSVN 2.1.0

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