--- Comment #25 from Neil Carlson <neil.n.carlson at gmail dot com> ---
Here's another example similar to those above but even simpler IMHO and
involving a CLASS(*) pointer component

type box
  class(*), pointer :: uptr => null()
end type
integer, target :: n
call sub(box(n))
  subroutine sub(b)
    type(box), intent(in) :: b
  end subroutine

call sub(box(n))
Error: Can't convert INTEGER(4) to CLASS(*) at (1)

This should work in F2003. GFortran seems to be fundamentally broken when it
comes to derived types with polymorphic pointer components and intrinsic
structure constructors.

Reply via email to