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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [dummy_functions_1.f90] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! PR 18197: Check that dummy functions with RESULT variable and dimension works.
3
module innerfun
4
contains
5
  function f(n,x) result(y)
6
    integer, intent(in) :: n
7
    real, dimension(:), intent(in) :: x
8
    real, dimension(n) :: y
9
    y = 1
10
  end function f
11
end module innerfun
12
 
13
module outerfun
14
contains
15
   subroutine foo(n,funname)
16
     integer, intent(in) :: n
17
     real, dimension(n) :: y
18
     real, dimension(2) :: x
19
     interface
20
       function funname(n,x) result(y)
21
         integer, intent(in) :: n
22
         real, dimension(:), intent(in) :: x
23
         real, dimension(n)  :: y
24
       end function funname
25
     end interface
26
 
27
     y = funname(n, (/ 0.2, 0.3 /) )
28
 
29
   end subroutine foo
30
end module outerfun
31
 
32
program test
33
   use outerfun
34
   use innerfun
35
   call foo(3,f)
36
end program test
37
 
38
! { dg-final { cleanup-modules "innerfun outerfun" } }

powered by: WebSVN 2.1.0

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