2015-05-16 Mikael Morin <mikael@gcc.gnu.org
authorMikael Morin <mikael@gcc.gnu.org>
Sat, 16 May 2015 08:09:52 +0000 (08:09 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 16 May 2015 08:09:52 +0000 (08:09 +0000)
commite24ba4ab129b4506c413831c3392d47119482c22
tree7b9dec81021cac5ea71da5192b1c5d992cc8ca68
parent30a5d3e6185a5fa01aec283ae9efe8b739dffdf9
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

From-SVN: r223234
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]