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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <[email protected]>:

https://gcc.gnu.org/g:11b351c59be7d306b1460a2be2cfde472a0dee5c

commit r16-7959-g11b351c59be7d306b1460a2be2cfde472a0dee5c
Author: Paul Thomas <[email protected]>
Date:   Mon Mar 9 16:07:48 2026 +0000

    Fortran: Fix invalid free for PDTs without LEN components [PR122902]

    2026-03-09  Paul Thomas  <[email protected]>

    gcc/fortran
            PR fortran/122902
            * expr.cc (has_parameterized_comps): Moved from trans-array.cc.
            * gfortran.h : Add prototype for has_parameterized_comps.
            * trans-array.cc : Move has_parameterized_comps to expr.cc.
            * trans-expr.cc (gfc_trans_scalar_assign): Don't deep copy PDTs
            unless they have parameterized components.

    gcc/testsuite/
            PR fortran/122902
            * gfortran.dg/pdt_39.f03: Deallocate a_r4 and a_r8.
            * gfortran.dg/pdt_86.f03: New test.

Reply via email to