Dear All,

I pushed the attached fix for a frontend memleak as obvious after
regtesting on x86_64-pc-linux-gnu as r16-5032-g4cad566793d0a2 .

The PR also mentions more valgrind issues suggesting lacking
initialization of C++ stuff which I have no idea how to fix.

Thanks,
Harald

From 4cad566793d0a2587a10f9669dfd0f5cdbd6d82d Mon Sep 17 00:00:00 2001
From: Harald Anlauf <[email protected]>
Date: Tue, 4 Nov 2025 20:04:55 +0100
Subject: [PATCH] Fortran: fix frontend memleak with DO CONCURRENT [PR122564]

	PR fortran/122564

gcc/fortran/ChangeLog:

	* resolve.cc (resolve_locality_spec): Delete temporary hash_set.
---
 gcc/fortran/resolve.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 5fa408ec48c..2a73f2a7ab5 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -8754,6 +8754,8 @@ resolve_locality_spec (gfc_code *code, gfc_namespace *ns)
 	  plist = &((*plist)->next);
 	}
     }
+
+  delete data.sym_hash;
 }
 
 /* Resolve a list of FORALL iterators.  The FORALL index-name is constrained
-- 
2.51.0

Reply via email to