]> 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>
Fri, 6 Dec 2024 09:04:37 +0000 (10:04 +0100)
commitd3c18b92c97b0fd477c7a43ab7af1ed88faec4ba
tree710c7be4e043387478b097bb264e1c5ac205801c
parentde7dc9bb0e8575d16d5040478e74e3dcb91376ff
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)
gcc/fortran/trans-io.cc
gcc/testsuite/gfortran.dg/bounds_check_array_io.f90 [new file with mode: 0644]