From: mikael Date: Wed, 6 Oct 2010 15:15:48 +0000 (+0000) Subject: 2010-10-06 Mikael Morin X-Git-Tag: upstream/4.9.2~26091 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30aaca0fa4d2b0314f9932d056c6586e8d68d259;p=platform%2Fupstream%2Flinaro-gcc.git 2010-10-06 Mikael Morin * 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 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5704021..c1ed716 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,10 @@ 2010-10-06 Mikael Morin + * simplify.c (gfc_simplify_size): Clear temporary mpz int before + returning. + +2010-10-06 Mikael Morin + * resolve.c (add_dt_to_dt_list): Remove unneeded if. 2010-10-06 Mikael Morin diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index cdefcb5..e45ed40 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; }