[0/3] Fix mpfr and mpz memory leaks

Message ID 20230402150515.40826-1-rep.dot.nop@gmail.com
Headers
Series Fix mpfr and mpz memory leaks |

Message

Bernhard Reutner-Fischer April 2, 2023, 3:05 p.m. UTC
  From: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>

Hi!

These patches for the go, rust and fortran frontends fix the mpfr and
mpz memory leaks my coccinelle script found.

Bootstrapped and regtested without regressions on x86_64-unknown-linux,
including go,rust,fortran.

Ok for trunk for the fortran bits?

I'd hope that go and rust can apply the respective patches upstream.

Bernhard Reutner-Fischer (3):
  go: Fix memory leak in Integer_expression
  rust: Fix memory leak in compile_{integer,float}_literal
  Fortran: Fix mpz and mpfr memory leaks

 gcc/fortran/array.cc                  | 3 +++
 gcc/fortran/expr.cc                   | 8 ++++----
 gcc/fortran/simplify.cc               | 7 ++++++-
 gcc/go/gofrontend/expressions.cc      | 5 +++++
 gcc/rust/backend/rust-compile-expr.cc | 7 +++++++
 5 files changed, 25 insertions(+), 5 deletions(-)