aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2024-05-12 21:48:03 +0200
committerHarald Anlauf <anlauf@gmx.de>2024-05-12 21:48:03 +0200
commit13b6ac4ebd04f0703d92828c9268b0b216890b0d (patch)
tree1f5cd7f63391769ded7c20927b91aa3e9825f915 /gcc
parent46077992180d6d86c86544df5e8cb943492d3b01 (diff)
downloadgcc-13b6ac4ebd04f0703d92828c9268b0b216890b0d.zip
gcc-13b6ac4ebd04f0703d92828c9268b0b216890b0d.tar.gz
gcc-13b6ac4ebd04f0703d92828c9268b0b216890b0d.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/primary.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc
index 606e844..8e78337 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;