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

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
Reduced code seems to be:

 module m
   type ty
     class(* ),allocatable::c1(:)
   end type
  type tt
     class(* ),allocatable::node1(:)
   end type
   type,extends(tt)::tte
     class(*),allocatable::c2e(:)
   end type
 contains
subroutine put_addr
 class (* ),allocatable :: t(:)
 integer::unit
select type(t)
 class is(tt)
select type(p=>t(2)%node1)
 class is(ty)
 write (unit) loc(p         (2)%c1  )
end select
select type(t)
   type is(tte)
    write (7) loc(t(2)%c2e)
    end select
end select
end
 end

and it's legal code, according to the gfortran compiler.

Reply via email to