2015-06-11 Paul Thomas <pault@gcc.gnu.org>
commite86bbccfb3293972c2ce36049ae6aa1ff6f9645b
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jun 2015 15:49:32 +0000 (11 15:49 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jun 2015 15:49:32 +0000 (11 15:49 +0000)
tree772bb92e54ad124ab4c61669c427440420730654
parentdb1ae94f252a869aaadda3f5a13139b9ed2ec327
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224383 138bc75d-0d04-0410-961f-82ee72b054a4
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]