Hi Harald,
I am working on memory leaks in the PDT tests with your comment #8
patch in place. It needed a further tweak to prevent memory leaks in
other tests:
diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc
index 638018bcce3..fd03ceace51 100644
--- a/gcc/fortran/primary.cc
+++ b/gcc/fortran/primary.cc
@@ -4067,7 +4067,7 @@ gfc_match_rvalue (gfc_expr **result)
{
gfc_symtree *pdt_st;
gfc_symbol *pdt_sym;
- gfc_actual_arglist *ctr_arglist, *tmp;
+ gfc_actual_arglist *ctr_arglist = NULL, *tmp;
gfc_component *c;
/* Obtain the template. */
@@ -4088,7 +4088,7 @@ gfc_match_rvalue (gfc_expr **result)
first argument list and return the parameter list in
ctr_arglist. */
m = gfc_get_pdt_instance (actual_arglist, &pdt_sym, &ctr_arglist);
- if (m != MATCH_YES)
+ if (m != MATCH_YES || !ctr_arglist)
{
if (ctr_arglist)
gfc_free_actual_arglist (ctr_arglist);
I'll close it out today or tomorrow, one way or another.
Paul
On Wed, 24 Sept 2025 at 20:22, anlauf at gcc dot gnu.org
<[email protected]> wrote:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122002
>
> --- Comment #16 from anlauf at gcc dot gnu.org ---
> (In reply to anlauf from comment #15)
> > pdt_48.f03 lacks an initialization here:
>
> Paul,
>
> shall we proceed with that fix plus the initializations from comment#8?
>
> That might reduce the noise in the testsuite.
>
> You could keep this pr open for the issue in comment#12.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> You are on the CC list for the bug.