diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90 new file mode 100644 index 000000000..0b97e09e0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90 @@ -0,0 +1,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 |