This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, Fortran] PR40039: Procedures as actual arguments: Check intent of arguments
- From: Tobias Burnus <burnus at net-b dot de>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 15 May 2009 00:07:57 +0200
- Subject: Re: [Patch, Fortran] PR40039: Procedures as actual arguments: Check intent of arguments
- References: <email@example.com>
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 ...