Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gfortran.fortran-torture / execute / retarray_2.f90
blobab14dd03caf5610440d9b1d3bfe17244d0ab5f07
1 ! Procedure to test module procedures returning arrays.
2 ! The array spec only gets applied to the result variable, not the function
3 ! itself. As a result we missed it during resolution, and used the wrong
4 ! calling convention (functions returning arrays must always have explicit
5 ! interfaces).
6 module retarray_2
7 contains
8 function z(a) result (aout)
9 integer, dimension(4) :: aout,a
10 aout = a
11 end function z
12 end module retarray_2
14 program retarray
15 use retarray_2
16 integer, dimension(4) :: b, a=(/1,2,3,4/)
17 b = z(a)
18 if (any (b .ne. (/1, 2, 3, 4/))) call abort
19 end