OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [retarray_2.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! 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
13
 
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
20
 

powered by: WebSVN 2.1.0

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