Debian Codegraph @

gcc/testsuite/gfortran.dg/proc_ptr_42.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR 56814: [4.8/4.9 Regression] Bogus Interface mismatch in dummy procedure
4 !
5 ! Contributed by Marco Restelli <[email protected]>
6
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
14
15 procedure(i_f), pointer :: f => null()
16 end module
17
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
29
30 program p
31 use m1
32 use m2
33 call ns_dirdata(f)
34 end