2015-05-16 Mikael Morin <mikael@gcc.gnu.org
commitb8f8c8497a93b471f82de8d8ee1629a0ed6e8e5d
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 May 2015 08:09:52 +0000 (16 08:09 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 May 2015 08:09:52 +0000 (16 08:09 +0000)
tree7b9dec81021cac5ea71da5192b1c5d992cc8ca68
parentb4e5c0d9628e1ab9c846c8f42868a5aa4e286024
2015-05-16  Mikael Morin  <mikael@gcc.gnu.org
    Paul Thomas  <pault@gcc.gnu.org>

PR fortran/65792
* trans-expr.c (gfc_trans_subcomponent_assign): Always assign
the expression component to the destination. In addition, if
the component has allocatable components, copy them and
deallocate those of the expression, if it is not a variable.
The expression is fixed if not a variable to prevent multiple
evaluations.

2015-05-16  Mikael Morin  <mikael@gcc.gnu.org>

PR fortran/65792
* gfortran.dg/derived_constructor_components_5: New test

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223234 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/derived_constructor_comps_5.f90 [new file with mode: 0644]