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/] [bounds.f90] - Rev 303
Compare with Previous | Blame | View Log
! Program to test the upper and lower bound intrinsicsprogram testboundsimplicit nonereal, dimension(:, :), allocatable :: ainteger, dimension(5) :: jinteger i! Check compile time simplificationif (lbound(j,1).ne.1 .or. ubound(j,1).ne.5) call abort ()allocate (a(3:8, 6:7))! With one parameterj = 0;j(3:4) = ubound(a)if (j(3) .ne. 8) call abortif (j(4) .ne. 7) call abort! With two parameters, assigning to an arrayj = lbound(a, 1)if ((j(1) .ne. 3) .or. (j(5) .ne. 3)) call abort! With a variable second parameteri = 2i = lbound(a, i)if (i .ne. 6) call abortcall test(a)containssubroutine test (a)real, dimension (1:, 1:) :: ainteger ii = 2if ((ubound(a, 1) .ne. 6) .or. (ubound(a, i) .ne. 2)) call abortend subroutineend program
