aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-10-06 15:25:51 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-10-06 15:25:51 +0000
commit1b02e40106a10a241a3753ffeeac2acfd21772fb (patch)
tree447c9d5d27d6b7b119372fb373e2816de15c88a6 /gcc/fortran
parent4f2b3d28a20053d20018732227a7865e33582f2d (diff)
downloadgcc-1b02e40106a10a241a3753ffeeac2acfd21772fb.zip
gcc-1b02e40106a10a241a3753ffeeac2acfd21772fb.tar.gz
gcc-1b02e40106a10a241a3753ffeeac2acfd21772fb.tar.bz2
symbol.c (free_entry_list): New function.
2010-10-06 Mikael Morin <mikael@gcc.gnu.org> * symbol.c (free_entry_list): New function. (gfc_free_namespace): Free list of entries. From-SVN: r165038
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/symbol.c17
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 97df7a5..80b013f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,10 @@
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
+ * symbol.c (free_entry_list): New function.
+ (gfc_free_namespace): Free list of entries.
+
+2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
+
* symbol.c (free_components): Free list of formal args and formal
namespace.
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index b06afe4..b900bc1 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -3255,6 +3255,22 @@ void gfc_free_charlen (gfc_charlen *cl, gfc_charlen *end)
}
+/* Free entry list structs. */
+
+static void
+free_entry_list (gfc_entry_list *el)
+{
+ gfc_entry_list *next;
+
+ if (el == NULL)
+ return;
+
+ next = el->next;
+ gfc_free (el);
+ free_entry_list (next);
+}
+
+
/* Free a namespace structure and everything below it. Interface
lists associated with intrinsic operators are not freed. These are
taken care of when a specific name is freed. */
@@ -3284,6 +3300,7 @@ gfc_free_namespace (gfc_namespace *ns)
gfc_free_charlen (ns->cl_list, NULL);
free_st_labels (ns->st_labels);
+ free_entry_list (ns->entries);
gfc_free_equiv (ns->equiv);
gfc_free_equiv_lists (ns->equiv_lists);
gfc_free_use_stmts (ns->use_stmts);