Assumes that patch http://gcc.gnu.org/ml/fortran/2009-10/msg00049.html is
already committed.

As written in http://gcc.gnu.org/ml/fortran/2009-10/msg00047.html, array valued
expressions do not work; presumably some other attributes need also to be
copied/honored. (cf. also PR 41599.)


implicit none
type t0
  integer :: j = 42
end type t0
type t
  integer :: i
  class(t0), allocatable :: foo(:)
end type t
type(t) :: m
allocate(t0 :: m%foo(3))
m%i = 5
select type(bar => m%foo)
type is(t0)
  print *, bar
end select
end


-- 
           Summary: [OOP] SELECT TYPE with associate-name => exp: Arrays not
                    supported
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to