Fortran: fix two minor front-end GMP memleaks
gcc/fortran/ChangeLog: * expr.cc (find_array_section): Do not initialize GMP variables twice.
This commit is contained in:
parent
12de1942a0
commit
d4525729b7
1 changed files with 2 additions and 2 deletions
|
@ -1613,7 +1613,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
|
|||
/* Zero-sized arrays have no shape and no elements, stop early. */
|
||||
if (!begin->shape)
|
||||
{
|
||||
mpz_init_set_ui (nelts, 0);
|
||||
mpz_set_ui (nelts, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1714,7 +1714,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
|
|||
constructor. */
|
||||
for (idx = 0; idx < (int) mpz_get_si (nelts); idx++)
|
||||
{
|
||||
mpz_init_set_ui (ptr, 0);
|
||||
mpz_set_ui (ptr, 0);
|
||||
|
||||
incr_ctr = true;
|
||||
for (d = 0; d < rank; d++)
|
||||
|
|
Loading…
Add table
Reference in a new issue