https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86206
Bug ID: 86206 Summary: ICE in forall Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: juergen.reuter at desy dot de Target Milestone: --- This is from c.l.f. posted by Beliavsky on April 27, 2016, it gave (at that time) an ICE in gfortran 5.3, and still does so in the actual trunk. I think this was never reported here on bugzilla. Here is the code: 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 ! pure function zero_mat(xx) result(ret) real , intent(in) :: xx(:,:) real :: ret(size(xx,1),size(xx,2)) integer :: i forall (i=1:size(xx,2)) ret(:,i) = zero_vec(xx(:,i)) end function zero_mat end module zero_mod