Hello, sorry to come late to the party.
Le 08/03/2025 à 13:52, Thomas Koenig a écrit :
diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc index edec907d33a..e3bc22f25e5 100644 --- a/gcc/fortran/interface.cc +++ b/gcc/fortran/interface.cc @@ -5836,6 +5836,8 @@ gfc_get_formal_from_actual_arglist (gfc_symbol *sym, { snprintf (name, GFC_MAX_SYMBOL_LEN, "_formal_%d", var_num ++); gfc_get_symbol (name, gfc_current_ns, &s); + /* We do not need this in an undo table. */ + gfc_pop_undo_symbol(); if (a->expr->ts.type == BT_PROCEDURE) { gfc_symbol *asym = a->expr->symtree->n.sym;
You may consider calling gfc_commit_symbol(s) instead at the end of the function body. It might avoid leaking the old_symbol field in case the function is called more than once or the symbol is already existing (not completely clear whether that can happen).
Mikael