public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6336] Fortran: frontend passes do_subscript leaks gmp memory [PR108924] Date: Fri, 24 Feb 2023 20:30:57 +0000 (GMT) [thread overview] Message-ID: <20230224203057.634183857C45@sourceware.org> (raw) https://gcc.gnu.org/g:45f406c4f62e516b58dcda20b5a7aa43ff0aa0f3 commit r13-6336-g45f406c4f62e516b58dcda20b5a7aa43ff0aa0f3 Author: Harald Anlauf <anlauf@gmx.de> Date: Fri Feb 24 19:56:32 2023 +0100 Fortran: frontend passes do_subscript leaks gmp memory [PR108924] gcc/fortran/ChangeLog: PR fortran/108924 * frontend-passes.cc (do_subscript): Clear used gmp variable. Diff: --- gcc/fortran/frontend-passes.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc index 02fcb41dbc4..90428982023 100644 --- a/gcc/fortran/frontend-passes.cc +++ b/gcc/fortran/frontend-passes.cc @@ -2883,7 +2883,10 @@ do_subscript (gfc_expr **e) have_do_end = false; if (!have_do_start && !have_do_end) - return 0; + { + mpz_clear (do_step); + return 0; + } /* No warning inside a zero-trip loop. */ if (have_do_start && have_do_end)
reply other threads:[~2023-02-24 20:30 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230224203057.634183857C45@sourceware.org \ --to=anlauf@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).