This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, Fortran, committed] Plug another memory leak
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 28 Aug 2012 07:35:35 +0200
- Subject: [Patch, Fortran, committed] Plug another memory leak
That's probably the last patch of this kind for a while.
By using formal_ns, the namespace is freed when the main symbol is freed.
Committed as Rev.
Tobias
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog (Revision 190737)
+++ gcc/fortran/ChangeLog (Arbeitskopie)
@@ -1,3 +1,8 @@
+2012-08-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54384
+ * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
+
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c (Revision 190737)
+++ gcc/fortran/symbol.c (Arbeitskopie)
@@ -4103,6 +4103,7 @@
of the formal args). */
gfc_current_ns = gfc_get_namespace (parent_ns, 0);
gfc_current_ns->proc_name = dest;
+ dest->formal_ns = gfc_current_ns;
for (curr_arg = src->formal; curr_arg; curr_arg = curr_arg->next)
{