1! { dg-do compile }
2! PR fortran/36459
3!
4abstract interface
5  function dim()
6    integer :: dim
7  end function dim
8end interface
9procedure(dim) :: f
10
11interface
12  integer function tan()
13  end function
14end interface
15procedure(tan) :: g
16
17print *, f()
18
19print *, tan()
20
21end
22