The following test program induces an infinite recursion in
gfc_get_derived_type:


implicit none

type :: t
  real :: data
  procedure(foo), pointer, nopass :: ppc
end type

type(t) :: o,o2

o%ppc => foo

o2 = o%ppc()

contains

  function foo()
    type(t) :: foo
    foo%data = 5.
    foo%ppc => NULL()
  end function

end


-- 
           Summary: [F03] infinite recursion in gfc_get_derived_type with
                    PPC returning derived type
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janus at gcc dot gnu dot org


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

Reply via email to