]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: runtime bounds-checking in presence of array constructors [PR31059]
authorHarald Anlauf <anlauf@gmx.de>
Thu, 31 Aug 2023 20:19:58 +0000 (22:19 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 1 Sep 2023 20:25:20 +0000 (22:25 +0200)
commit6f06152541d62ae7c8579b7d7bf552be19e15b05
treed2807d4c8e124754ad854ec32d784d26cf97429c
parente7b267444045c507654a2a3f758efee5d5b550df
Fortran: runtime bounds-checking in presence of array constructors [PR31059]

gcc/fortran/ChangeLog:

PR fortran/31059
* trans-array.cc (gfc_conv_ss_startstride): For array bounds checking,
consider also array constructors in expressions, and use their shape.

gcc/testsuite/ChangeLog:

PR fortran/31059
* gfortran.dg/bounds_check_fail_5.f90: New test.
gcc/fortran/trans-array.cc
gcc/testsuite/gfortran.dg/bounds_check_fail_5.f90 [new file with mode: 0644]