view gcc/testsuite/gfortran.dg/module_procedure_3.f90 @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

! { dg-do run }
!
! PR fortran/94348
!
! Contributed by Damian Rouson

module foo_module
  implicit none

  interface
     module function foo() result(bar)
       implicit none
       integer bar
     end function
  end interface

contains
  module procedure foo
    bar = 5
  end procedure
end module

program main
  use foo_module
  implicit none
  if (foo() /= 5) stop 1
end program main