PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_27.f90
blob128d6a6f52af9fab6135b4eeace719ffe562578a
1 ! { dg-do compile }
3 ! PR 40039: Procedures as actual arguments: Check intent of arguments
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 module m
9 contains
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
21 real function func(z)
22 real,intent(inout) :: z
23 func = z**2
24 end function
26 subroutine caller
27 interface
28 real function p(y)
29 real,intent(in) :: y
30 end function
31 end interface
32 pointer :: p
34 call a(4.3,func) ! { dg-error "INTENT mismatch in argument" }
35 p => func ! { dg-error "INTENT mismatch in argument" }
36 end subroutine
38 end module