[Bug fortran/94361] [8/9/10/11 Regression] Memory leak in nested types with final

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun May 31 10:00:27 GMT 2020


--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>:


commit r11-749-g811f902b764c5a13178cbd7588e96c16b3fab504
Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date:   Sun May 31 10:26:40 2020 +0200

    Finalization depends on the expression, not on the component.

    This patch fixes a 8/9/10/11 regression, where finalized types
    were not finalized (and deallocated), which led to memory


    2020-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

            PR fortran/94361
            * class.c (finalize_component): Use expr->finalized instead of
            * gfortran.h (gfc_component): Remove finalized member.
            (gfc_expr): Add it here instead.


    2020-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

            PR fortran/94361
            * gfortran.dg/finalize_28.f90: Adjusted free counts.
            * gfortran.dg/finalize_33.f90: Likewise.
            * gfortran.dg/finalize_34.f90: Likewise.
            * gfortran.dg/finalize_35.f90: New test.

More information about the Gcc-bugs mailing list