The one of following valid Fortran 90 functions is rejected: While the first
function "func" works and has function name = result name, the second
("func2"), which uses RESULT(), is rejected with the error message:

Error: The type for function 'func2' at (1) is not accessible


type(t) function func()
  type t
    sequence
    integer :: i = 5
  end type t
end function func

type(t) function func2() result(res)
  type t
    sequence
    integer :: i = 5
  end type t
end function func2


-- 
           Summary: F90: DT function with in-line DT definition and RESULT
                    is rejected
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 32834
             nThis:


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

Reply via email to