https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104430

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The patch also fixes an ICE for this code, taken from
https://stackoverflow.com/q/73498995/981959

program main

    integer, dimension(1:2) :: iii
    real, dimension(1:4,1:4,1:2) :: myArray

    associate(iix => iii(1), iiy=> iii(2) )
    forall( iix=1:4, iiy=1:4 )
        myArray(iix,iiy,1) = iix + iiy
        myArray(iix,iiy,2) = (iix + iiy)*10
    endforall
    end associate

    print *, myArray(:,:,1)
    print *, myArray(:,:,2)

end program main


I know nothing about Fortran, but it looks sufficiently different to me that
maybe it's worth adding another test based on this code, so we don't regress.

The question of whether to backport to gcc-10 or close this is still waiting
for an answer too.

Reply via email to