[Patch, fortran] PR47592 - Multiple function invocation with ALLOCATE (SOURCE=REPEAT('x',bar()))
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Feb 6 09:59:00 GMT 2011
The fix for this PR is sufficiently straightforward that the patch and
the ChangeLogs speak for themselves.
Note that I have removed the calls of gfc_start_block and replaced
them with gfc_init_block, since the former does all sorts of strange
things with declarations as the warning in trans.c indicates.
Bootstraps and regtests on FC9/x86_64 - OK for trunk?
Cheers
Paul
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 8593 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110206/bb6503ea/attachment.bin>
More information about the Fortran
mailing list