aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-08-27 16:42:50 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-08-27 16:42:50 +0200
commitc0782a4002d2529b76ffe861c5870e2e2c097f5a (patch)
tree15043861f31137f5ab2a8ef8c06bcc5d0627faf8 /gcc/fortran
parent7b93bdde911212694e170bb8063b11a91bbc0bcd (diff)
downloadgcc-c0782a4002d2529b76ffe861c5870e2e2c097f5a.zip
gcc-c0782a4002d2529b76ffe861c5870e2e2c097f5a.tar.gz
gcc-c0782a4002d2529b76ffe861c5870e2e2c097f5a.tar.bz2
re PR fortran/54384 (gfortran memory leaks)
2012-08-27 Tobias Burnus <burnus@net-b.de> PR fortran/54384 * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss and loop. From-SVN: r190713
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-expr.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index b660073..c3e6185 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
2012-08-27 Tobias Burnus <burnus@net-b.de>
+ PR fortran/54384
+ * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
+ and loop.
+
+2012-08-27 Tobias Burnus <burnus@net-b.de>
+
PR fortran/41093
* gfortran.h (gfc_common_head): Add "int refs".
* match.c (gfc_match_common): Increment refs.
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index ebaa238..3ab7d5d 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -6781,6 +6781,11 @@ gfc_trans_arrayfunc_assign (gfc_expr * expr1, gfc_expr * expr2)
gfc_conv_function_expr (&se, expr2);
gfc_add_block_to_block (&se.pre, &se.post);
+ if (ss)
+ gfc_cleanup_loop (&loop);
+ else
+ gfc_free_ss_chain (se.ss);
+
return gfc_finish_block (&se.pre);
}