https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120711
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Andre Vehreschild <ve...@gcc.gnu.org>: https://gcc.gnu.org/g:8b7a779b85df65a29fe3820886cbd72663b6dba4 commit r15-9914-g8b7a779b85df65a29fe3820886cbd72663b6dba4 Author: Andre Vehreschild <ve...@gcc.gnu.org> Date: Wed Jun 25 09:12:35 2025 +0200 Fortran: Fix out of bounds access in structure constructor's clean up [PR120711] A structure constructor's generated clean up code was using an offset variable, which was manipulated before the clean up was run leading to an out of bounds access. PR fortran/120711 gcc/fortran/ChangeLog: * trans-array.cc (gfc_trans_array_ctor_element): Store the value of the offset for reuse. gcc/testsuite/ChangeLog: * gfortran.dg/asan/array_constructor_1.f90: New test. (cherry picked from commit dff66a690f6d47963e5cb96677d0e194b85948fa)