This is the mail archive of the gcc-bugs@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]

[Bug fortran/35152] Implicit procedure with keyword=argument is accepted



------- 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


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