PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_46.f90
blobc01b82212108e02d815f25ef92afa48045e51e53
1 ! { dg-do compile }
3 ! PR 77596: [F03] procedure pointer component with implicit interface can point to a function
5 ! Contributed by toK <t.kondic@leeds.ac.uk>
7 program xxx
8 implicit none
10 type tf
11 procedure(), nopass, pointer :: fp
12 end type tf
14 call ass()
16 contains
18 integer function ff(x)
19 integer, intent(in) :: x
20 ff = x + 1
21 end function ff
23 subroutine ass()
24 type(tf) :: p
25 p%fp=>ff ! { dg-error "is not a subroutine" }
26 call p%fp(3)
27 end subroutine ass
29 end