diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-06 15:15:48 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-06 15:15:48 +0000 |
commit | 30aaca0fa4d2b0314f9932d056c6586e8d68d259 (patch) | |
tree | c3e169cecbf7db8b884f7b08961f2a7b4c926677 /gcc/fortran/simplify.c | |
parent | 84e25a666cfc1ac0e5d146229aaec90b3c33b7c5 (diff) | |
download | gcc-30aaca0fa4d2b0314f9932d056c6586e8d68d259.tar.gz |
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
* simplify.c (gfc_simplify_size): Clear temporary mpz int before
returning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r-- | gcc/fortran/simplify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index cdefcb51533..e45ed401085 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -5477,6 +5477,7 @@ gfc_expr * gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) { mpz_t size; + gfc_expr *return_value; int d; int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); @@ -5548,7 +5549,9 @@ gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) return NULL; } - return gfc_get_int_expr (k, &array->where, mpz_get_si (size)); + return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size)); + mpz_clear (size); + return return_value; } |