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



Tobias Burnus <burnus at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |burnus at gcc dot gnu.org



--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-02 
08:06:54 UTC ---

Actually, that example is probably okay. Steven Lionel wrote:



"But reading this I wonder if it's intended to mean actual arguments of derived

type with allocatable components, rather than a regular allocatable array,

since there's no issue of making copies of subcomponents here. Let me discuss

it with my

team here."





However, the following code should be invalid (due to the implicit deallocating

the allocatable component *on the remote image*):



type t

  integer, allocatable :: x

end type t

class(t), allocatable :: x[:]

 call bar(x[1]) ! <<< Wrongly accepted.

! call foo(x[1]) ! OK: Rejected coindexed polymorphic -> polymorphic not

allowed

contains

 subroutine bar(r)

   type(t) :: r

 end

 subroutine foo(r)

   class(t) :: r

 end

end

Reply via email to