summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_comp_25.f90
blob: 68355262979d923c2c3fc02c5e4a3f0e05356ecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
!
! PR 46060: [F03] procedure pointer component referenced without argument list
!
! Contributed by Stephen J. Bespalko <sjbespa@comcast.net>

implicit none

abstract interface
  function name_func (ivar) result (res)
    integer, intent(in) :: ivar
    character(len=8) :: res
  end function name_func
end interface

type var_type
  procedure(name_func), nopass, pointer :: name
end type var_type

type(var_type) :: vars
character(len=8) name

name = vars%name   ! { dg-error "requires an argument list" }

end