OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [arrayarg2.f90] - Diff between revs 303 and 338

Only display areas with differences | Details | Blame | View Log

Rev 303 Rev 338
! Program to test array arguments which depend on other array arguments
! Program to test array arguments which depend on other array arguments
program arrayarg2
program arrayarg2
   integer, dimension(5) :: a, b
   integer, dimension(5) :: a, b
   a = (/1, 2, 3, 4, 5/)
   a = (/1, 2, 3, 4, 5/)
   b = (/2, 3, 4, 5, 6/)
   b = (/2, 3, 4, 5, 6/)
   call test (a, b)
   call test (a, b)
   if (any (b .ne. (/4, 7, 10, 13, 16/))) call abort
   if (any (b .ne. (/4, 7, 10, 13, 16/))) call abort
contains
contains
subroutine test (x1, x2)
subroutine test (x1, x2)
   implicit none
   implicit none
   integer, dimension(1:), intent(in) :: x1
   integer, dimension(1:), intent(in) :: x1
   integer, dimension(1:), intent(inout) :: x2
   integer, dimension(1:), intent(inout) :: x2
   integer, dimension(1:size(x1)) :: x3
   integer, dimension(1:size(x1)) :: x3
   x3 = x1 * 2
   x3 = x1 * 2
   x2 = x2 + x3
   x2 = x2 + x3
end subroutine test
end subroutine test
end program
end program
 
 

powered by: WebSVN 2.1.0

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