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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [interface_27.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 40039: Procedures as actual arguments: Check intent of arguments
4
!
5
! Contributed by Janus Weil 
6
 
7
module m
8
 
9
contains
10
 
11
subroutine a(x,f)
12
  real :: x
13
  interface
14
    real function f(y)
15
      real,intent(in) :: y
16
    end function
17
  end interface
18
  print *,f(x)
19
end subroutine
20
 
21
real function func(z)
22
  real,intent(inout) :: z
23
  func = z**2
24
end function
25
 
26
subroutine caller
27
  interface
28
    real function p(y)
29
      real,intent(in) :: y
30
    end function
31
  end interface
32
  pointer :: p
33
 
34
  call a(4.3,func)  ! { dg-error "INTENT mismatch in argument" }
35
  p => func         ! { dg-error "INTENT mismatch in argument" }
36
end subroutine
37
 
38
end module
39
 
40
! { dg-final { cleanup-modules "m" } }
41
 

powered by: WebSVN 2.1.0

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