re PR fortran/79344 (segmentation faults and run-time errors)
authorAndre Vehreschild <vehre@gcc.gnu.org>
Sun, 5 Feb 2017 15:43:03 +0000 (16:43 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Sun, 5 Feb 2017 15:43:03 +0000 (16:43 +0100)
commit139d4065e80d9141a23cf84d8b31fc9ee7c5d8c3
treec07eb1799927d7474a9ed1151941fa320a1276ef
parentea06c7b0c4299833959a6a62a7a57533e60c8418
re PR fortran/79344 (segmentation faults and run-time errors)

gcc/fortran/ChangeLog:

2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/79344
* trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
the temporary, when a new object was created for the temporary.  Not
when it is just an alias to an existing object.

gcc/testsuite/ChangeLog:

2017-02-04  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/79344
* gfortran.dg/allocate_with_source_24.f90: New test.

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