This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40646] [F03] array-valued procedure pointer components
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jul 2009 12:24:46 -0000
- Subject: [Bug fortran/40646] [F03] array-valued procedure pointer components
- References: <bug-40646-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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