This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33897] Incorrect host association in module
- From: "paulthomas2 at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2007 15:47:42 -0000
- Subject: [Bug fortran/33897] Incorrect host association in module
- References: <bug-33897-14284@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from paulthomas2 at wanadoo dot fr 2007-10-27 15:47 -------
Subject: Re: Incorrect host association in module
burnus at gcc dot gnu dot org wrote:
> ------- Comment #11 from burnus at gcc dot gnu dot org 2007-10-27 13:31 -------
> To recap (correct me, if I'm wrong):
>
> The program in comment 0 (original bug description) is valid Fortran, but the
> "setbd" is an external function which needs to be provided at link time. It is
> not the module function as "integer :: setbd" causes "setbd" to be an external
> function with an implicit interface. -> wrong-code bug as gfortran uses the
> module function. (see also program in comment 4.)
>
Correct
> The first program of comment 1: I think this is valid Fortran code; what
> puzzles me is that gfortran rejects it with "Global name 'setbd' is already
> being used as a FUNCTION". I think these are complete different name spaces
> with the function names __ksbin1_aux_mod_MOD_setbd and setbd_: One being part
> of a module and the other not. The same for the second program of comment 1. ->
> rejects-valid.
>
decl.c uses add_global_entry a bit too profusely. It needs to be
checked that the entry has global scope; ie. that gfc_current_ns->parent
== NULL.
I have a patch that properly implements 14.6.1.3, which is regtesting as
I write.
Cheers
paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33897