https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117791
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:d3c18b92c97b0fd477c7a43ab7af1ed88faec4ba commit r14-11065-gd3c18b92c97b0fd477c7a43ab7af1ed88faec4ba Author: Harald Anlauf <anl...@gmx.de> Date: Wed Nov 27 21:11:16 2024 +0100 Fortran: fix crash with bounds check writing array section [PR117791] PR fortran/117791 gcc/fortran/ChangeLog: * trans-io.cc (gfc_trans_transfer): When an array index depends on a function evaluation or an expression, do not use optimized array I/O of an array section and fall back to normal scalarization. gcc/testsuite/ChangeLog: * gfortran.dg/bounds_check_array_io.f90: New test. (cherry picked from commit 2261a15c0715cbf5c129b66ee44fc1d3a9e36972)