Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
tobias.schlueter@physik.uni-muenchen.de
tobias.schlueter@physik.uni-muenchen.de
Wed Jun 7 12:02:00 GMT 2006
Hi Paul,
Paul Thomas <paulthomas2@wanadoo.fr> wrote on Wed, 07 Jun 2006:
>>>> ! if (gfc_current_ns->parent == NULL || module_fcn_entry)
>>>
> Absolutely not!
>
> (gfc_current_ns->parent == NULL || module_fcn_entry) >> external
> entries/module function entries
>
> else >> module subroutine entries
The code looks like this:
if (gfc_current_ns->parent == NULL || module_fcn_entry)
rc = gfc_get_symbol (name, NULL, result);
else
rc = gfc_get_symbol (name, gfc_current_ns->parent, result);
Both branches will do the same thing if (!module_fcn_entry) : the
second argument to gfc_get_symbol will equal gfc_current_ns->parent,
be it NULL or something else. In other words, the pre-existing if was
pointless.
- Tobi
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Gcc-patches
mailing list