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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-17
                 CC|                            |janus at gcc dot gnu.org
            Summary|OOP False Error: The rank   |[OOP] The rank of the
                   |of the element in the       |element in the structure
                   |structure constructor       |constructor does not match
                   |                            |that of the component
     Ever confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org ---
Reduced test case:


module ObjectLists
  implicit none

  Type TObjectList
  contains
    procedure :: ArrayItem
  end Type

contains

  function ArrayItem(L) result(P)
    Class(TObjectList) :: L
    Class(TObjectList), pointer :: P(:)
  end function

end module


  use ObjectLists
  implicit none

  Type, extends(TObjectList):: TSampleList
  end Type

contains

  subroutine TSampleList_ConfidVal(L)
    Class(TSampleList) :: L
  end subroutine

end


Same error with 4.7, 4.8 and trunk. (In 4.6 and earlier, polymorphic arrays are
not supported yet.)

Reply via email to