summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90
blob: 0b97e09e03b78491ff71b34080cfaaf6a7843b42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do compile }
!
! PR 46841: [F03] ICE on allocating array of procedure pointers
!
! Contributed by Martien Hulsen <m.a.hulsen@tue.nl>

  type vfunc_p
    procedure (dum_vfunc), pointer, nopass :: p => null()
  end type vfunc_p

  type(vfunc_p), allocatable, dimension(:) :: vfunc1 

  allocate(vfunc1(10))

contains

  function dum_vfunc ()
    real, dimension(2) :: dum_vfunc
    dum_vfunc = 0
  end function dum_vfunc

end