This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR25098 - Variable as actual argument for procedure dummy argument allowed
- From: tobias dot schlueter at physik dot uni-muenchen dot de
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 May 2006 22:26:58 +0200
- Subject: Re: [Patch, fortran] PR25098 - Variable as actual argument for procedure dummy argument allowed
- References: <4468E143.3010505@wanadoo.fr>
Paul Thomas <paulthomas2@wanadoo.fr> wrote on Mon, 15 May 2006:
The detection of the error is effected in interface.c. If the actual
argument is a variable and the formal argument flavor is procedure, the
only way in which this cannot be an error is if the procedure is
already compiled but not declared in the current namespace. This is
Can you add a comment indicating where this is found in the standard?
I find this quite surprising, and couldn't find it while looking
briefly.
2006-05-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25098
* interface.c (compare_parameter): If the actual argument is a
variable and the formal a procedure, this can only not be an
error if a gsymbol exists for a procedure of the same name.
* (compare_actual_formal): Provide a specific error message for
the case of a variable masquerading as a procedure.
I think it would be cleaner if you issue the error in
compare_parameter (passing it the locus).
Apart from those two issues, this is of course ok.
- Tobi
:REVIEWMAIL:
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.