https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119800

--- Comment #6 from kargls at comcast dot net ---
(In reply to kargls from comment #5)
> (In reply to anlauf from comment #4)
> > (In reply to Keith Refson from comment #3)
> > > I think it probably also needs to flag up if MOLD contains an allocatable 
> > > or
> > > pointer component too.  Modifying the example to TRANSFER to an integer,
> > > followed by a second TRANSFER with SOURCE= as an integer array and MOLD as
> > > the type, should warn on both instances.
> > 
> > Indeed, the problem is MOLD, not SOURCE.
> 
> Yeah, Keith is correct in that the patch should also check MOLD.
> 

In looking at the nascent patch, we likely need to walk the components
as well.  Is something like the following an issue?

type c
  integer, allocatable :: z(:)
end type c

type a
  integer i
  type(c) b  ! <-- allocatable component needs checking.
end type a

Hmmm, attr contain an alloc_comp and pointer_comp field.

Reply via email to