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

            Bug ID: 60232
           Summary: OOP False Error: The rank of the element in the
                    structure constructor
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info

module defining inherited class

module Samples
    use ObjectLists
    implicit none

    Type, extends(TObjectList):: TSampleList
    contains
    procedure :: ConfidVal => TSampleList_ConfidVal
    end Type TSampleList

contains

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

    end subroutine TSampleList_ConfidVal

end module Samples

gives false compiler error:

<During initialization>

Error: The rank of the element in the structure constructor at (1) does not
match that of the component (1/0)


The code is valid and works in ifort (from CosmoMC package). The inherited
ObjectLists module is available at 

http://gcc.gnu.org/bugzilla/attachment.cgi?id=31394

(I have not yet been able to make a shorter single-file test case but did try.)

Reply via email to