This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Wed, Jan 25, 2006 at 09:19:31PM +0200, Erik Edelmann wrote:
> On Wed, Jan 25, 2006 at 01:29:11AM +0200, Erik Edelmann wrote:
> > On Wed, Jan 25, 2006 at 01:23:34AM +0200, Erik Edelmann wrote:
> > > On Wed, Jan 25, 2006 at 12:20:28AM +0100, Tobias Schlüter wrote:
> > > > Erik Edelmann wrote:
> > > > ... in gfc_commit_symbol
> > > > > + if (sym->old_symbol != NULL)
> > > > > + {
> > > > > + gfc_free (sym->old_symbol);
> > > >
> > > > I see this is the same as in gfc_commit_symbols, but can you tell me why not
> > > > gfc_free_symbol?
> > >
> > > Umm, no. I just brain-lessly copied it from gfc_commit_symbols.
> > > Using gfc_free_symbol would probably be better (in both
> > > functions).
> >
> > Except that replacing gfc_free with gfc_free_symbol here gives a
> > vast amount of testcase failures. I'll investigate it closer
> > tomorrow (it's getting late).
>
> old_sym is a shallow copy of sym. A deep deallocataion of
> old_symbol (using gfc_free_symbol) would free a bunch of data
> structures needed by sym itself.
Well, there are actually two "allocatable" things in
sym->old_symbol that might differ from corresponding things in
sym: 'as' and 'value'. Here's an updated patch that deallocates
old_symbol a little bit better, using a new function symbol.c
(free_old_symbol).
Tested on Linux/x86, 4.1 and mainline.
Erik
2005-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/25716
* symbol.c (free_old_symbol): New function.
(gfc_commit_symbols): Use it.
(gfc_commit_symbol): New function.
(gfc_use_derived): Use it.
* gfortran.h: Add prototype for gfc_commit_symbol.
* intrinsic.c (gfc_find_function): Search in 'conversion'
if not found in 'functions'.
(gfc_convert_type_warn): Add a symtree to the new
expression node, and commit the new symtree->n.sym.
* resolve.c (gfc_resolve_index): Make sure typespec is
properly initialized.
2005-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/25716
* gfortran.dg/char_result_11.f90: Make it sensitive to PR
25716 on 32-bit systems too.
Attachment:
25716.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |