From: Mikael Morin Date: Wed, 6 Oct 2010 16:11:23 +0000 (+0000) Subject: trans-expr.c (get_proc_ptr_comp): Restore initial expression type before calling... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3231fe9002a12774393910a6fd2d68437562817a;p=gcc.git trans-expr.c (get_proc_ptr_comp): Restore initial expression type before calling gfc_free_expr. 2010-10-06 Mikael Morin * trans-expr.c (get_proc_ptr_comp): Restore initial expression type before calling gfc_free_expr. From-SVN: r165048 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dc0bfbb1e38..4f8a609278f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2010-10-06 Mikael Morin + + * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end. + 2010-10-06 Mikael Morin * trans-expr.c (get_proc_ptr_comp): Restore initial expression type 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);