re PR fortran/66079 (memory leak with source allocation in internal subprogram)
authorPaul Thomas <pault@gcc.gnu.org>
Thu, 11 Jun 2015 15:49:32 +0000 (15:49 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Thu, 11 Jun 2015 15:49:32 +0000 (15:49 +0000)
commit26e46e4b94267360451114c8fc1ec5ee6ef5e6a6
tree772bb92e54ad124ab4c61669c427440420730654
parent133bc698cb8f42e3655fc68fee19c62fd18d98f7
re PR fortran/66079 (memory leak with source allocation in internal subprogram)

2015-06-11  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/66079
* trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
function results must be freed and nullified after use. Create
a temporary to hold the result to prevent duplicate calls.
* trans-stmt.c (gfc_trans_allocate): Rename temporary variable
as 'source'. Deallocate allocatable components of non-variable
'source's.

2015-06-11  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/66079
* gfortran.dg/allocatable_scalar_13.f90: New test

From-SVN: r224383
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 [new file with mode: 0644]