diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90 new file mode 100644 index 000000000..715d4368a --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90 @@ -0,0 +1,28 @@ +! { dg-do compile } +! +! PR 40176: Fortran 2003: Procedure pointers with array return value +! +! Contributed by Janus Weil <janus@gcc.gnu.org> + +module m + +abstract interface + function ai() + real, dimension(3) :: ai + end function +end interface + +type t + procedure(ai), pointer, nopass :: ppc +end type + +procedure(ai), pointer :: pp + +end module + +program test +use m +type(t) :: obj +obj%ppc => pp +pp => obj%ppc +end |