Commit 091c9413 by Erik Edelmann

symbol.c (free_old_symbol): Fix confusing comment, and add code to free old_symbol->formal.

fortran/
2005-01-27  Erik Edelmann  <eedelman@gcc.gnu.org>

        * symbol.c (free_old_symbol): Fix confusing comment, and add code
         to free old_symbol->formal.

From-SVN: r110301
parent 929e5e5b
2005-01-27 Erik Edelmann <eedelman@gcc.gnu.org>
* symbol.c (free_old_symbol): Fix confusing comment, and add code
to free old_symbol->formal.
2005-01-26 Paul Thomas <pault@gcc.gnu.org> 2005-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25964 PR fortran/25964
......
...@@ -2230,8 +2230,11 @@ gfc_undo_symbols (void) ...@@ -2230,8 +2230,11 @@ gfc_undo_symbols (void)
} }
/* Free sym->old_symbol. sym->old_symbol is mostly a shallow copy of sym; but /* Free sym->old_symbol. sym->old_symbol is mostly a shallow copy of sym; the
few components might have been given new values. */ components of old_symbol that might need deallocation are the "allocatables"
that are restored in gfc_undo_symbols(), with two exceptions: namelist and
namelist_tail. In case these differ between old_symbol and sym, it's just
because sym->namelist has gotten a few more items. */
static void static void
free_old_symbol (gfc_symbol * sym) free_old_symbol (gfc_symbol * sym)
...@@ -2245,6 +2248,9 @@ free_old_symbol (gfc_symbol * sym) ...@@ -2245,6 +2248,9 @@ free_old_symbol (gfc_symbol * sym)
if (sym->old_symbol->value != sym->value) if (sym->old_symbol->value != sym->value)
gfc_free_expr (sym->old_symbol->value); gfc_free_expr (sym->old_symbol->value);
if (sym->old_symbol->formal != sym->formal)
gfc_free_formal_arglist (sym->old_symbol->formal);
gfc_free (sym->old_symbol); gfc_free (sym->old_symbol);
sym->old_symbol = NULL; sym->old_symbol = NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment