re PR fortran/31320 (Illegal read with gfortran.dg/alloc_comp_assign_2.f90 and *_3...
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 17 Jul 2007 17:22:44 +0000 (17:22 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Tue, 17 Jul 2007 17:22:44 +0000 (17:22 +0000)
commit28114dadadfeedf9de14b51e8e2a5e5859d619e3
tree68ba4b18261ead6f352d9cbbba151c1b0052fd4e
parent4c85af60e8b5736e5534fee89d1a671b9f3ab7a9
re PR fortran/31320 (Illegal read with gfortran.dg/alloc_comp_assign_2.f90 and *_3.f90)

2007-07-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/31320
PR fortran/32665
* trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
renormalization unity base is done independently of existing
lbound value.
(gfc_trans_scalar_assign): If rhs is not a variable, put
lse->pre after rse->pre to ensure that de-allocation of lhs
occurs after evaluation of rhs.

2007-07-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/31320
PR fortran/32665
* gfortran.dg/alloc_comp_constructor_3.f90: New test.

From-SVN: r126703
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/alloc_comp_constructor_3.f90 [new file with mode: 0644]