http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46067
--- Comment #6 from janus at gcc dot gnu.org 2010-10-21 07:51:37 UTC ---
Here is a variant of the test case in comment #3 which uses plain procedure
pointers instead of PPCs (and avoids recursive I/O):
implicit none
type test_type
integer :: id = 1
end type
abstract interface
real function fun_interface(t,x)
import :: test_type
real, intent(in) :: x
class(test_type) :: t
end function
end interface
type(test_type) :: funs
real :: r
procedure(fun_interface), pointer :: pp
pp => fun1
r = pp(funs,0.)
print *, " pp(0) ", r
contains
real function fun1 (t,x)
real, intent(in) :: x
type(test_type) :: t
print *," id = ", t%id
fun1 = cos(x)
end function
end