10 procedure(), pointer :: pp
11 print *, c_sizeof(pp
) ! { dg-error "Procedure unexpected as argument" }
12 print *, c_sizeof(foo
) ! { dg-error "Procedure unexpected as argument" }
13 print *, c_sizeof(bar
) ! { dg-error "Procedure unexpected as argument" }
19 integer function foo2()
20 procedure(), pointer :: ptr
21 ptr
=> foo2
! { dg-error "Function result 'foo2' is invalid as proc-target in procedure pointer assignment" }
24 ptr
=> foo2
! { dg-error "Function result 'foo2' is invalid as proc-target in procedure pointer assignment" }
28 ptr
=> foo2
! { dg-error "Function result 'foo2' is invalid as proc-target in procedure pointer assignment" }
34 integer function foo(i
, fptr
) bind(C
)
38 type(c_funptr
) :: fptr
39 fptr
= c_funloc(foo
) ! { dg-error "Function result 'foo' at .1. is invalid as X argument to C_FUNLOC" }
41 fptr
= c_funloc(foo
) ! { dg-error "Function result 'foo' at .1. is invalid as X argument to C_FUNLOC" }
46 fptr
= c_funloc(foo
) ! { dg-error "Function result 'foo' at .1. is invalid as X argument to C_FUNLOC" }