https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66079
--- Comment #12 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Sun Oct 18 18:36:52 2015 New Revision: 228952 URL: https://gcc.gnu.org/viewcvs?rev=228952&root=gcc&view=rev Log: 2015-10-18 Paul Thomas <pa...@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-10-18 Paul Thomas <pa...@gcc.gnu.org> PR fortran/66079 * gfortran.dg/allocatable_scalar_13.f90: New test Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/trans-expr.c branches/gcc-5-branch/gcc/fortran/trans-stmt.c branches/gcc-5-branch/gcc/testsuite/ChangeLog