diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/proc_decl_15.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_decl_15.f90 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_15.f90 b/gcc/testsuite/gfortran.dg/proc_decl_15.f90 new file mode 100644 index 000000000..f099c1dea --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_decl_15.f90 @@ -0,0 +1,20 @@ +! { dg-do run } +! PR fortran/35830 +! +function f() + real, allocatable :: f(:) + allocate(f(1:3)) + f(1:3)= (/9,8,7/) +end function + +program test + implicit none + abstract interface + function ai() + real, allocatable :: ai(:) + end function + end interface + procedure(ai) :: f + if(any(f() /= [9,8,7])) call abort() + if(size(f()) /= 3) call abort() +end |