https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120711

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andre Vehreschild <ve...@gcc.gnu.org>:

https://gcc.gnu.org/g:dff66a690f6d47963e5cb96677d0e194b85948fa

commit r16-1696-gdff66a690f6d47963e5cb96677d0e194b85948fa
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.

Reply via email to