This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/40646] [F03] array-valued procedure pointer components



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]