Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gfortran.fortran-torture / execute / arrayarg2.f90
blob9cb5b613d64cc64d71de36a3dc9933d825086101
1 ! Program to test array arguments which depend on other array arguments
2 program arrayarg2
3 integer, dimension(5) :: a, b
5 a = (/1, 2, 3, 4, 5/)
6 b = (/2, 3, 4, 5, 6/)
8 call test (a, b)
10 if (any (b .ne. (/4, 7, 10, 13, 16/))) call abort
11 contains
12 subroutine test (x1, x2)
13 implicit none
14 integer, dimension(1:), intent(in) :: x1
15 integer, dimension(1:), intent(inout) :: x2
16 integer, dimension(1:size(x1)) :: x3
18 x3 = x1 * 2
19 x2 = x2 + x3
20 end subroutine test
21 end program