------- Comment #8 from janus at gcc dot gnu dot org  2009-07-10 12:24 -------
After most of the PPC issues have been fixed by r149419, some leftover trouble:
The following two variants of comment #2 and comment #4 both fail with

internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1042

********************************

module bugTestMod
  implicit none
  type:: boundTest
    procedure(returnMat), pointer, nopass:: test
  end type boundTest
contains
  function returnMat( a, b ) result( mat )
    integer:: a, b
    double precision, dimension(a,b):: mat 
    mat = 1d0
  end function returnMat
end module bugTestMod

program bugTest
  use bugTestMod
  implicit none
  type( boundTest ):: testObj
  testObj%test => returnMat
  print *,testObj%test(2,2)
end program bugTest

********************************

module bugTestMod
  implicit none
  procedure(returnMat), pointer :: pp
contains
  function returnMat( a, b ) result( mat )
    integer:: a, b
    double precision, dimension(a,b):: mat 
    mat = 1d0
  end function returnMat
end module bugTestMod

program bugTest
  use bugTestMod
  implicit none
  pp => returnMat
  print *,pp(2,2)
end program bugTest


-- 


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

Reply via email to