view gcc/testsuite/gfortran.dg/proc_decl_14.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! PR fortran/35830
!
abstract interface
  function ptrfunc()
    integer, pointer :: ptrfunc
  end function ptrfunc
  elemental subroutine elem(a)
    integer,intent(in) :: a
  end subroutine elem
  function dims()
    integer :: dims(3)
  end function dims
end interface

procedure(ptrfunc) :: func_a
procedure(elem)    :: func_b
procedure(dims)     :: func_c

integer, pointer :: ptr
integer :: array(3)

ptr => func_a()
call func_b([1,2,3])
array = func_c()
end