Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
François-Xavier Coudert
fxcoudert@gmail.com
Wed Jun 7 14:19:00 GMT 2006
Tobias' point (unless I misunderstood it) is that
>> if (gfc_current_ns->parent == NULL)
>> rc = gfc_get_symbol (name, NULL, result);
>> else
>> rc = gfc_get_symbol (name, gfc_current_ns->parent, result);
is, under the rules of the C language, strictly equivalent to
>> rc = gfc_get_symbol (name, gfc_current_ns->parent, result);
and that
> 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);
is also strictly equivalent to
> if (module_fcn_entry)
> rc = gfc_get_symbol (name, NULL, result);
> else
> rc = gfc_get_symbol (name, gfc_current_ns->parent, result);
The strict equivalence does not arise from the Fortran standard or
assumptions made elsewhere, it would be true of any C code of the form
> if (a == NULL)
> foo (NULL);
> else
> foo (a);
or
> if (a == NULL || b)
> foo (NULL);
> else
> foo (a);
Regards,
FX
More information about the Gcc-patches
mailing list