[Bug fortran/104430] [10 Regression] ICE in gfc_conv_component_ref, at fortran/trans-expr.cc:2742 since r9-3522-gd0477233215e37de

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 26 10:59:48 GMT 2022


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.


More information about the Gcc-bugs mailing list