re PR fortran/83567 (Parametrized derived types: Segmentation fault when assigning...
authorPaul Thomas <pault@gcc.gnu.org>
Thu, 28 Dec 2017 13:22:36 +0000 (13:22 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Thu, 28 Dec 2017 13:22:36 +0000 (13:22 +0000)
commit96acdb8dc260f2ab3ec5826e8a510c6a7fee665d
tree6397b7b179b1437798cb0c17ee9afde33d64130a
parent7b7801e35116595a6ef0669f7a7874b90b0a55a1
re PR fortran/83567 (Parametrized derived types: Segmentation fault when assigning a function return value)

2017-12-28  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83567
* trans-expr.c (gfc_trans_assignment_1): Free parameterized
components of the lhs if dealloc is set.
*trans-decl.c (gfc_trans_deferred_vars): Do not free the
parameterized components of function results on leaving scope.

2017-12-28  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83567
* gfortran.dg/pdt_26.f90 : New test.

From-SVN: r256019
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pdt_26.f03 [new file with mode: 0644]