1! { dg-do run }
2! PR fortran/33945
3!
4! PROCEDURE in the interface was wrongly rejected
5module modproc
6  implicit none
7  interface bar
8    procedure x
9  end interface bar
10  procedure(sub) :: x
11  interface
12    integer function sub()
13    end function sub
14  end interface
15end module modproc
16
17integer function x()
18  implicit none
19  x = -5
20end function x
21
22program test
23  use modproc
24  implicit none
25  if(x() /= -5) STOP 1
26end program test
27