------- Comment #3 from janus at gcc dot gnu dot org 2010-06-28 19:46 ------- The following variant also fails (without the ASSOCIATED statement being inside a subroutine):
program rte1 implicit none type::node_type class(node_type),pointer::parent,child integer::id end type node_type class(node_type),pointer::root allocate(root) allocate(root%child) root%child%parent=>root root%id=1 root%child%id=2 print *,root%child%id," is child of ",root%id,":" print *,root%child%parent%id,root%id,associated(root%child%parent,root) end program rte1 -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[OOP] Associated() doesn't |[OOP] ASSOCIATED fails on |work in subroutine |polymorphic variables http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44696