summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_12.f90
blob: 325703f499d5833c2a239ecf62203b0b708f26d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do run }
!
! PR 36704: Procedure pointer as function result
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

procedure(integer),pointer :: p
p => foo()
if (p(-1)/=1) call abort
contains
  function foo() result(bar)
    procedure(integer),pointer :: bar
    bar => iabs
  end function
end