[Patch, libgfortran] PR 40330 Fix use of saved format strings

Janne Blomqvist blomqvist.janne@gmail.com
Wed Jun 3 19:01:00 GMT 2009


Hi,

the attached patch fixes PR 40330. The problem was that for the saved
format strings we were just keeping pointer to the strings that reside
in the st_parameter_dt structure. However, this lives on the stack so
once it goes out of scope the cached entries became invalid. Fixed by
using heap storage.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk and 4.4?

-- 
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog
Type: application/octet-stream
Size: 313 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090603/c03d3841/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr40330-ioregression.diff
Type: text/x-patch
Size: 2067 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090603/c03d3841/attachment.bin>


More information about the Fortran mailing list