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

--- Comment #7 from janus at gcc dot gnu.org 2011-05-28 10:53:18 UTC ---
Here is a reduced test case for the ICE:


module datetime_mod

    implicit none
    private

    type :: DateTime
    contains
        procedure :: getFormattedString
    end type

contains

    function getTimeString(dt, FMT) result(string)
        character(:), allocatable :: string
        class(DateTime), intent(IN) :: dt
        integer, optional, intent(IN) :: FMT

        string = dt%getFormattedString(2, FMT)
    end function 

    function getFormattedString(this, FILTER, FMT) &
        result(string)
        character(:), allocatable :: string
        class(DateTime), intent(IN) :: this
        integer, optional, intent(IN) :: FILTER, FMT

    end function

end module

Reply via email to