public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-391] Fortran: fix frontend memleak
@ 2024-05-12 19:51 Harald Anlauf
  0 siblings, 0 replies; only message in thread
From: Harald Anlauf @ 2024-05-12 19:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:13b6ac4ebd04f0703d92828c9268b0b216890b0d

commit r15-391-g13b6ac4ebd04f0703d92828c9268b0b216890b0d
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sun May 12 21:48:03 2024 +0200

    Fortran: fix frontend memleak
    
    gcc/fortran/ChangeLog:
    
            * primary.cc (gfc_match_varspec): Replace 'ref' argument to
            is_inquiry_ref() by NULL when the result is not needed to avoid
            a memleak.

Diff:
---
 gcc/fortran/primary.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc
index 606e84432be6..8e7833769a8f 100644
--- a/gcc/fortran/primary.cc
+++ b/gcc/fortran/primary.cc
@@ -2250,7 +2250,7 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
 	 can be found.  If this was an inquiry reference with the same name
 	 as a derived component and the associate-name type is not derived
 	 or class, this is fixed up in 'gfc_fixup_inferred_type_refs'.  */
-      if (mm == MATCH_YES && is_inquiry_ref (name, &tmp)
+      if (mm == MATCH_YES && is_inquiry_ref (name, NULL)
 	  && !(sym->ts.type == BT_UNKNOWN
 		&& gfc_find_derived_types (sym, gfc_current_ns, name)))
 	inquiry = true;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-12 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-12 19:51 [gcc r15-391] Fortran: fix frontend memleak Harald Anlauf

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).