3 ! PR 39630: [F03] Procedure Pointer Components with PASS
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
10 procedure() :: p0
! { dg-error "POINTER attribute is required for procedure pointer component" }
15 procedure(foo1
), pointer :: f1
! { dg-error "must be scalar" }
20 procedure(foo2
), pointer :: f2
! { dg-error "may not have the POINTER attribute" }
25 procedure(foo3
), pointer :: f3
! { dg-error "may not be ALLOCATABLE" }
29 procedure(), pass(x
), pointer :: f4
! { dg-error "NOPASS or explicit interface required" }
30 procedure(real), pass(y
), pointer :: f5
! { dg-error "NOPASS or explicit interface required" }
31 procedure(foo6
), pass(c
), pointer :: f6
! { dg-error "has no argument" }
35 procedure(foo7
), pass
, pointer :: f7
! { dg-error "must have at least one argument" }
39 procedure(foo8
), pass
, pointer :: f8
! { dg-error "must be of the derived type" }
44 subroutine foo1 (x1
,y1
)
49 subroutine foo2 (x2
,y2
)
50 type(t2
),pointer :: x2
54 subroutine foo3 (x3
,y3
)
55 type(t3
),allocatable
:: x3
59 real function foo6 (a
,b
)
64 integer function foo7 ()
68 character function foo8 (i
)
74 ! { dg-final { cleanup-modules "m" } }