[Bug fortran/86206] ICE in gfc_resolve_forall, at fortran/resolve.c:9989
anlauf at gmx dot de
gcc-bugzilla@gcc.gnu.org
Fri Jun 22 19:31:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86206
--- Comment #3 from Harald Anlauf <anlauf at gmx dot de> ---
No ICE if the module is split into two parts:
! No ICE
module zero_mod
implicit none
contains
pure function zero_vec(xx) result(ret)
real, intent(in) :: xx(:)
real :: ret(size(xx))
integer :: i
forall (i=1:size(xx)) ret(i) = 0.0
end function zero_vec
end module zero_mod
module zero_mod2
use zero_mod
implicit none
contains
pure function zero_mat(xx) result(ret)
real, intent(in) :: xx(:,:)
real :: ret(size(xx,1),size(xx,2))
integer :: j
forall (j=1:size(xx,2)) ret(:,j) = zero_vec(xx(:,j))
end function zero_mat
end module
More information about the Gcc-bugs
mailing list