summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-06 16:11:23 +0000
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-06 16:11:23 +0000
commitcd0a40a070c255e040ed801dbe433b1cab4d867b (patch)
tree86b4d79fba51d04c4dc659ef12fcdb7810826aa4
parent990529747fae5e7c195bb6b06dd62fcc8e77eb75 (diff)
downloadppe42-gcc-cd0a40a070c255e040ed801dbe433b1cab4d867b.tar.gz
ppe42-gcc-cd0a40a070c255e040ed801dbe433b1cab4d867b.zip
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
* trans-expr.c (get_proc_ptr_comp): Restore initial expression type before calling gfc_free_expr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165048 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/trans-stmt.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index dc0bfbb1e38..4f8a609278f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,9 @@
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
+ * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
+
+2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
+
* trans-expr.c (get_proc_ptr_comp): Restore initial expression type
before calling gfc_free_expr.
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 12ebe4ab54b..1a4828addb6 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -3462,6 +3462,13 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info)
gfc_free (varexpr);
gfc_free (saved_vars);
+ for (this_forall = info->this_loop; this_forall;)
+ {
+ iter_info *next = this_forall->next;
+ gfc_free (this_forall);
+ this_forall = next;
+ }
+
/* Free the space for this forall_info. */
gfc_free (info);
OpenPOWER on IntegriCloud