This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35152] Implicit procedure with keyword=argument is accepted
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2008 12:17:05 -0000
- Subject: [Bug fortran/35152] Implicit procedure with keyword=argument is accepted
- References: <bug-35152-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from burnus at gcc dot gnu dot org 2008-03-20 12:17 -------
> With this revision the following code gives an error:
> Call bar_pwrk(pr,p,f,cd,info,work=aux)
The error is correct; bar_pwrk is known in module bar_pr_mod, that module is
then imported in module foo_pr_mod but under the name foo_pwrk. Subroutine
foo_sub now uses the module foo_pr_mod and thus only the symbol foo_pwrk and
not bar_pwrk is use associated. Therefore, bar_pwrk has an implicit interface,
which per C1225 may not use the keyword= syntax.
(All compilers I tried give the same error as gfortran.)
(I have to admit that I miss an option to enforce that the name of a
non-intrinsic subroutine has to be made available before using PROCEDURE,
EXTERNAL, INTERFACE or being use/host associated. Unfortunately, IMPLICIT NONE
does not enforce this.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35152