http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49630

--- Comment #3 from janus at gcc dot gnu.org 2011-07-04 20:21:55 UTC ---
Here is a related deferred-length example:


module abc
  implicit none

  type::abc_type
   contains
     procedure::abc_function
  end type abc_type

contains

  function abc_function(this)
    class(abc_type),intent(in)::this
    character(:),allocatable::abc_function
    allocate(abc_function,source="hello")
  end function abc_function

  subroutine do_something(this)
    class(abc_type),intent(in)::this
    print *,this%abc_function()
  end subroutine do_something

end module abc


use abc
type(abc_type) :: a
call do_something(a)
end


This currently ICEs, but when changing the type-bound call in the "print" line
to a plain function call, i.e. "abc_function(this)", then it is accepted and
gives the expected output.

Reply via email to