https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66079
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Thu Jun 11 15:49:32 2015 New Revision: 224383 URL: https://gcc.gnu.org/viewcvs?rev=224383&root=gcc&view=rev Log: 2015-06-11 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-06-11 Paul Thomas <pa...@gcc.gnu.org> PR fortran/66079 * gfortran.dg/allocatable_scalar_13.f90: New test Added: trunk/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/testsuite/ChangeLog