On 4/8/25 1:43 PM, Harald Anlauf wrote:
Hi all,
the attached patch fixes a rather strange 12/13/14/15 regression.
When walking through the list of procedures in an interface to
find the matching one, the code could remember an inferred type
from a false module procedure within the same interface if and
only if optional arguments were in the procedure declarations,
and the procedure call did not provide an actual argument for
an optional one. An inferred type could then leak into
gfc_conv_procedure_call and pretend a wrong type for the dummy.
(This bug appears to be related to a code refactoring during
12-development and is not present in 11-releases.)
The simple and obvious solution is to use the type of the formal,
as inferred types are only relevant when there is no explicit
interface.
Regtested on x86_64-pc-linux-gnu. OK for mainline?
As this is a regression, I would like to backport this as
appropriate.
Thanks,
Harald
This looks OK Harold, thanks!
Jerry