------- Comment #2 from janus at gcc dot gnu dot org 2009-07-04 12:38 -------
The same program with procedure pointer components instead of type-bound
procedures gives a different ICE:
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
!double precision, dimension(2,2):: testCatch
type( boundTest ):: testObj
testObj%test => returnMat ! ICE in gfc_trans_pointer_assignment, at
fortran/trans-expr.c:4108
!write(*,*)testObj%test(2,2)
!testCatch = testObj%test(2,2)
!write(*,*)testCatch
end program bugTest
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40646