This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR40039: Procedures as actual arguments: Check intent of arguments


Janus Weil wrote:
> Hi all,
>
> here is my fix for PR40039, which checks the intent of arguments for
> procedure pointer assignments and procedures as actual arguments.
>   
Very briefly glancing at the changes, they look OK. However, I think we
urgently need to change the error processing. Currently we simply print
"Type/rank mismatch in argument", which is very unspecific and I could
imagine that one might compare the interface quite long, until one
realizes that the INTENT is different (e.g. missing vs. present).

In principle, adding error messages to gfc_compare_interfaces is
trivial, the hard part is that it is used to check whether a generic
interface matches. Printing errors for the missed hits does not make
sense. One needs to think about how to handle the generic part and
probably some other loose ends but then it should be quite simple but a
bit laborious. But I think it is worthwhile to do. (But maybe better
after the check in of this patch.)

I plan to have a closer look at this patch tomorrow, but if someone else
wants to review it ...

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]