From c1dfe49e7f633bed527ab6a95faa1d79f4ee6e32 Mon Sep 17 00:00:00 2001 From: mikael Date: Wed, 6 Oct 2010 16:30:08 +0000 Subject: [PATCH] 2010-10-06 Mikael Morin * trans-array.c (gfc_free_ss_chain): Made non-static. * trans-array.h (gfc_free_ss_chain): New prototype. * trans-stmt.c (gfc_trans_where_2): Free ss chains. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165052 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-array.c | 2 +- gcc/fortran/trans-array.h | 2 ++ gcc/fortran/trans-stmt.c | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ce484d1..6a2316d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2010-10-06 Mikael Morin + * trans-array.c (gfc_free_ss_chain): Made non-static. + * trans-array.h (gfc_free_ss_chain): New prototype. + * trans-stmt.c (gfc_trans_where_2): Free ss chains. + +2010-10-06 Mikael Morin + * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's subcomponents. diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index f70d16e..52ba831 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -448,7 +448,7 @@ static void gfc_free_ss (gfc_ss *); /* Free a gfc_ss chain. */ -static void +void gfc_free_ss_chain (gfc_ss * ss) { gfc_ss *next; diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index f363716..4b0da3e 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -81,6 +81,8 @@ void gfc_cleanup_loop (gfc_loopinfo *); void gfc_add_ss_to_loop (gfc_loopinfo *, gfc_ss *); /* Mark a SS chain as used in this loop. */ void gfc_mark_ss_chain_used (gfc_ss *, unsigned); +/* Free a gfc_ss chain. */ +void gfc_free_ss_chain (gfc_ss *); /* Calculates the lower bound and stride of array sections. */ void gfc_conv_ss_startstride (gfc_loopinfo *); diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 1a4828a..c0ffd16 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -3927,6 +3927,9 @@ gfc_trans_where_2 (gfc_code * code, tree mask, bool invert, inner_size = compute_inner_temp_size (cblock->expr1, cblock->expr1, &inner_size_body, &lss, &rss); + gfc_free_ss_chain (lss); + gfc_free_ss_chain (rss); + /* Calculate the total size of temporary needed. */ size = compute_overall_iter_number (nested_forall_info, inner_size, &inner_size_body, block); -- 2.7.4