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" }
40 procedure(foo9
), pass
, pointer :: f9
! { dg-error "Non-polymorphic passed-object dummy argument" }
45 subroutine foo1 (x1
,y1
)
50 subroutine foo2 (x2
,y2
)
51 class(t2
),pointer :: x2
55 subroutine foo3 (x3
,y3
)
56 class(t3
),allocatable
:: x3
60 real function foo6 (a
,b
)
65 integer function foo7 ()
69 character function foo8 (i
)