summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_decl_5.f90
blob: b327d5c128cafbbbeef2ab4966caad7fabfa58ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
! { dg-do run }
! PR fortran/33945
!
! PROCEDURE in the interface was wrongly rejected
module modproc
  implicit none
  interface bar
    procedure x
  end interface bar
  procedure(sub) :: x
  interface
    integer function sub()
    end function sub
  end interface
end module modproc

integer function x()
  implicit none
  x = -5
end function x

program test
  use modproc
  implicit none
  if(x() /= -5) call abort()
end program test

! { dg-final { cleanup-modules "modproc" } }