aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/proc_decl_5.f90
blob: d2cb046378884c03d467ba04d10f62ad2c7b9797 (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
! { 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