[Bug fortran/47224] New: ICE with procedure pointer component
m.a.hulsen at tue dot nl
gcc-bugzilla@gcc.gnu.org
Sat Jan 8 17:58:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47224
Summary: ICE with procedure pointer component
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: m.a.hulsen@tue.nl
The code below gives:
t.f90: In function ‘poisson_natboun_surface’:
t.f90:23:0: internal compiler error: in gfc_walk_variable_expr, at
fortran/trans-array.c:7325
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Note, that if xg(:) is replaced with xg it compiles normally.
module element_defs_m
use kind_defs_m
type coefficients_t
procedure (dum_vfunc), pointer, nopass :: vfunc => null()
end type coefficients_t
contains
function dum_vfunc ( n, x )
integer, intent(in) :: n
real, intent(in), dimension(:) :: x
real, dimension(n) :: dum_vfunc
dum_vfunc = 0
end function dum_vfunc
end module element_defs_m
module poisson_elements_m
use element_defs_m
implicit none
contains
subroutine poisson_natboun_surface ( coefficients )
type(coefficients_t), intent(in) :: coefficients
real, allocatable, dimension(:) :: xg, normal
real :: a
integer :: ndim = 3
a = dot_product ( normal, coefficients%vfunc ( ndim, xg(:) ) )
end subroutine poisson_natboun_surface
end module poisson_elements_m
More information about the Gcc-bugs
mailing list