URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [assumed_size.f90] - Rev 695
Compare with Previous | Blame | View Log
! Program to test assumed size arrayssubroutine test2(p)integer, dimension(2, *) :: pif (any (p(:, 1:3) .ne. reshape((/1, 2, 4, 5, 7, 8/), (/2, 3/)))) &call abort ()end subroutineprogram assumed_sizeinteger, dimension (3, 3) :: aexternal test2a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))call test1(a, (/1, 2, 3, 4, 5, 6/))if (a(1,1) .ne. 0) call aborta(1, 1) = 1call test1(a(1:2, :), (/1, 2, 4, 5, 7, 8/))if (a(1,1) .ne. 0) call aborta(1, 1) = 1call test1(a(3:1:-1, :), (/3, 2, 1, 6, 5, 4/))if (a(3,1) .ne. 0) call aborta(3, 1) = 3call test1(a(:, 2:3), (/4, 5, 6, 7, 8, 9/))if (a(1, 2) .ne. 0) call aborta(1, 2) = 4call test2(a(1:2, :))call test2((/1, 2, 4, 5, 7, 8/))containssubroutine test1(p, q)integer, dimension(*) :: pinteger, dimension(1:) :: qif (any (p(1:size(q)) .ne. q)) call abort ()p(1) = 0end subroutineend program
