https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113471
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:94b2e6cb1cc4feb122bf77f19a657c97bffa9b42 commit r14-8295-g94b2e6cb1cc4feb122bf77f19a657c97bffa9b42 Author: Harald Anlauf <anl...@gmx.de> Date: Fri Jan 19 21:20:44 2024 +0100 Fortran: fix wrong array bounds check [PR113471] gcc/fortran/ChangeLog: PR fortran/113471 * trans-array.cc (array_bound_check_elemental): Array bounds check shall apply here to elemental dimensions of an array section only. gcc/testsuite/ChangeLog: PR fortran/113471 * gfortran.dg/bounds_check_24.f90: New test.