This is currently marked TODO in interface.c:gfc_expand_expr/gfc_expand_assign. When looking for a matching interface or type-bound operator, we could always continue looking through all possibilities and see if more than one option is found, in which case we should emit an error (or at least warn about that one of those will be chosen "arbitrarily").
I take this on.
Do the functions gfc_expand_expr/gfc_expand_assign exist at all anymore? At least not in interface.c, but I think I found them anywhere in gcc/fortran. Could this PR be deprecated?
Nothing has been done here for a decade, and the functions mentioned below (gfc_expand_expr and gfc_expand_assign) do not exist any longer in the code.
> Nothing has been done here for a decade, and the functions mentioned below > (gfc_expand_expr and gfc_expand_assign) do not exist any longer in the code. They don't even appear in the ChangeLogs, closing as INVALID.