summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_decl_15.f90
blob: f099c1deafb7323864b520aaee36a6bf3cf6538e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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