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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-13 
22:13:53 UTC ---
Created attachment 22747
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22747
Draft patch

Draft patch fixes "2 VALID" and "3 VALID" - however, I see failures for the
following examples. Additionally, the gfc_is_coindexed check is still missing.

Additional examples:

  class(foo), allocatable :: o_foo(:)
  class(foo), allocatable :: o_bar(:)[:]

! Expected: "o => o_foo" gives an error because of missing "(...)"
! However, it is accepted by NAG and Intel; the gfortran message is strange
!    select type(o => o_foo)                ! 4 INVALID
      type is(foo) ! "must have a deferred shape"
      j = o(1)%i
    end select

   select type(o => o_bar)                ! 5 VALID
     type is(foo)
     j = o(1)[1]%i ! "Unexpected coarray designator"
   end select

   select type(o => o_foo(1))  ! ICE segfault       
     type is(foo)              ! 6 VALID
     j = o%i
   end select

Reply via email to