re PR fortran/47592 (Multiple function invocation with ALLOCATE (SOURCE=REPEAT('x...
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 6 Feb 2011 14:22:48 +0000 (14:22 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 6 Feb 2011 14:22:48 +0000 (14:22 +0000)
commit90cf3ecc837d6f0c8d7b9068d9321bf494a830c6
tree83ccb035c9e45ef14dd291bdc88ba6dea11e5cf6
parentd5d3781a0d0934ad401412cd5471adc8519e463d
re PR fortran/47592 (Multiple function invocation with ALLOCATE (SOURCE=REPEAT('x',bar())))

2011-02-06  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/47592
* trans-stmt.c (gfc_trans_allocate): For deferred character
length allocations with SOURCE, store to the values and string
length to avoid calculating twice.  Replace gfc_start_block
with gfc_init_block to avoid unnecessary contexts and to keep
declarations of temporaries where they should be. Tidy up the
code a bit.

2011-02-06  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/47592
* gfortran.dg/allocate_with_source_1 : New test.

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