2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_42.f90
blob8556fdf0c217b6a074caede384ce740607fff17b
1 ! { dg-do compile }
3 ! PR 56814: [4.8/4.9 Regression] Bogus Interface mismatch in dummy procedure
5 ! Contributed by Marco Restelli <mrestelli@gmail.com>
7 module m1
8 abstract interface
9 pure function i_f(x) result(d)
10 real, intent(in) :: x(:,:)
11 real :: d(size(x,1),size(x,2))
12 end function
13 end interface
15 procedure(i_f), pointer :: f => null()
16 end module
18 module m2
19 contains
20 pure subroutine ns_dirdata(fun)
21 interface
22 pure function fun(x) result(d)
23 real, intent(in) :: x(:,:)
24 real :: d(size(x,1),size(x,2))
25 end function
26 end interface
27 end subroutine
28 end module
30 program p
31 use m1
32 use m2
33 call ns_dirdata(f)
34 end
36 ! { dg-final { cleanup-modules "m1 m2" } }