This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46371] [Coarray] [OOP] SELECT TYPE: scalar coarray variable is rejected


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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-24 16:41:54 UTC ---
Polymorphic array example: Todo check for validity and fix.

program p
  use m
  class(foo), allocatable :: o_bar(:)[:]
  integer :: j

  allocate(foo :: o_bar(5)[*])

  select type(o_bar)
    type is(foo)
      j = o_bar(2)[1]%i
  end select

!! FIXME: "type if (foo)" fails with:
!! Associate-name '__tmp_type_foo' at (1) is used as array
  select type(a => o_bar)
    type is (foo)
      j = a(1)[1]%i
  end select

!! FIXME: "a" should be a rank 0 not a rank 1
!!        array
  select type(a => o_bar(1))
    type is (foo)
      j = a[2]%i
  end select
end program p


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]