[patch, Fortran] Fix PR 119157, regression with -Wexternal-argument-mismatch

Thomas Koenig tkoenig@netcologne.de
Sun Mar 9 16:40:51 GMT 2025


Hi Mikael,


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

You're right, this is the cleaner solution.

(Actually, none of the cases you mentioned above can happen, at least
not now, but you're right).  Patch which does this approved?

Best regards

	Thomas



More information about the Fortran mailing list