]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Dependency check in PDT specification assignments [PR83763]
authorPaul Thomas <pault@gcc.gnu.org>
Mon, 15 Sep 2025 05:49:54 +0000 (06:49 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 15 Sep 2025 05:49:54 +0000 (06:49 +0100)
commit857c742e7bb8b24a05180e1cfee62efa417a48fe
tree3a02c10c926c5f5ea7b29590b985dceeea24d210
parent32fbfbe6302c9faf9e49daaad1d291d84b2366f1
Fortran: Dependency check in PDT specification assignments [PR83763]

2025-09-15  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/83763
* trans-decl.cc (gfc_trans_deferred_vars): Ensure that the
parameterized components of PDTs that do not have allocatable
components are deallocated on leaving scope.
* trans-expr.cc (gfc_trans_assignment_1): Do a dependency check
on PDT assignments. If there is a dependency between lhs and
rhs, deallocate the lhs parameterized components after the rhs
has been evaluated.

gcc/testsuite/
PR fortran/83763
* gfortran.dg/pdt_46.f03: New test.
gcc/fortran/trans-decl.cc
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/pdt_46.f03 [new file with mode: 0644]