]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix crash with bounds check writing array section [PR117791]
authorHarald Anlauf <anlauf@gmx.de>
Wed, 27 Nov 2024 20:11:16 +0000 (21:11 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 28 Nov 2024 20:47:03 +0000 (21:47 +0100)
commit2261a15c0715cbf5c129b66ee44fc1d3a9e36972
tree67ba958ee79f3afb0cd39b45d567a6d0493fdffd
parent1e2b03e4d66d894c2e42d209502b6957b2dabbf9
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.
gcc/fortran/trans-io.cc
gcc/testsuite/gfortran.dg/bounds_check_array_io.f90 [new file with mode: 0644]