From 9ce32b2560ae6bdeed54817621a67a3842740045 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Wed, 6 Oct 2010 15:35:04 +0000 Subject: [PATCH] symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list before overwriting it. 2010-10-06 Mikael Morin * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list before overwriting it. From-SVN: r165040 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/symbol.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 63a818c0dd7..7d2f798da51 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2010-10-06 Mikael Morin + + * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list + before overwriting it. + 2010-10-06 Mikael Morin * array.c (gfc_match_array_spec): Don't re-initialize cleared struct. diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 93199cf7089..9dd754904f4 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -4203,6 +4203,7 @@ gfc_copy_formal_args_ppc (gfc_component *dest, gfc_symbol *src) } /* Add the interface to the symbol. */ + gfc_free_formal_arglist (dest->formal); dest->formal = head; dest->attr.if_source = IFSRC_DECL;