[Patch, fortran] PR59016, second version
Mikael Morin
mikael.morin@sfr.fr
Thu Apr 9 22:19:00 GMT 2015
Hello,
I have finally taken over PR59016.
The bug was a pointer to a freed (derived type) symbol retained in the
generic one with the same name, because the symbols weren't versioned.
Evangelos proposed a patch that was freeing the memory by hand. The
simpler one here, on the other hand, saves the symbol before any
modification and lets the symbol undo code do its job.
Thanks to Evangelos anyway for isolating the bug and proposing a fix.
This patch has been tested on x86_64-unknown-linux-gnu.
OK for trunk/4.9/4.8?
Mikael
-------------- next part --------------
2015-04-09 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/56674
PR fortran/58813
PR fortran/59016
PR fortran/59024
* symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
former to the latter and make non-static. Update callers.
* gfortran.h (gfc_save_symbol_data): New prototype.
* decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
before modifying symbols 'sym' and 'dt_sym'.
2015-04-09 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/56674
PR fortran/58813
PR fortran/59016
PR fortran/59024
* gfortran.dg/used_types_27.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr59016_v3.diff
Type: text/x-patch
Size: 2138 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150409/2830f082/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: used_types_27.f90
Type: text/x-fortran
Size: 528 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150409/2830f082/attachment-0001.bin>
More information about the Gcc-patches
mailing list