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

2025-03-15 Thread Mikael Morin
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_

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

2025-03-09 Thread Mikael Morin
Le 09/03/2025 à 17:40, Thomas Koenig a écrit : 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

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

2025-03-09 Thread Thomas Koenig
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 wheth

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

2025-03-08 Thread Thomas Koenig
Am 08.03.25 um 20:29 schrieb Steve Kargl: On Sat, Mar 08, 2025 at 01:52:06PM +0100, Thomas Koenig wrote: While looking at the code, I also saw that a member of gfc_symbol introduced with my patch should be a bitfield of width 1. OK for trunk? OK (assuming a successful regression test run).

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

2025-03-08 Thread Steve Kargl
On Sat, Mar 08, 2025 at 01:52:06PM +0100, Thomas Koenig wrote: > > the attached patch fixes an ICE regresseion where undo state was not > handled properly when generating formal from actual arguments, which > occurred under certain conditions with the newly introduced > -Wexternal-argument-mismatc

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

2025-03-08 Thread Thomas Koenig
Hello world, the attached patch fixes an ICE regresseion where undo state was not handled properly when generating formal from actual arguments, which occurred under certain conditions with the newly introduced -Wexternal-argument-mismatch option. The fix is simple: When we are generating these