[Patch, Fortran, committed] PR58579 - fix allocation of string temporaries: Avoid overallocation
Tobias Burnus
burnus@net-b.de
Tue Oct 1 21:00:00 GMT 2013
In gfc_conv_string_tmp, gfortran allocates temporary strings. However,
using "TYPE_SIZE (type)" didn't yield one byte as intended but 64 -
which means that gfortran allocated 64 times as much memory as needed.
I wonder whether the same issue also occurs elsewhere.
Committed (Rev. ) after building and regtesting on x86-64-gnu-linux. I
didn't see a simple way to generate a test case - but the dump of the
PR's test case looks fine both for kind=1 and kind=4 strings.
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: committed.diff
Type: text/x-patch
Size: 1518 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20131001/3f38c8c8/attachment.bin>
More information about the Fortran
mailing list