This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "Paul Thomas" <paulthomas2 at wanadoo dot fr>
- Cc: tobias dot schlueter at physik dot uni-muenchen dot de, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 7 Jun 2006 16:19:18 +0200
- Subject: Re: Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m5/3X/V7DxrM4YRlKQRAZVFQuIvIUJ3YGA3pcCDv1qst6U7+Utmjk54iQQ45zJZAUWPL2DKjMC7EOQL6aMUOwNf9oh3SdXWBSv9Ilw10JzS6+J9/47kL5tNjrPRtyyIBRBtY12Nmnw/ZXTEp4DH1dGc0NwuU5xabwPH3iF8ye5c=
- References: <447D6C10.302@wanadoo.fr> <44849089.5070806@wanadoo.fr> <20060605222525.twxsjz75cscgwcko@www.physik.uni-muenchen.de> <4486554C.3010609@wanadoo.fr> <20060607140139.655ngzg9sggs0ko4@www.physik.uni-muenchen.de> <4486DC40.3000504@wanadoo.fr>
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
- References:
- Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
- Re: Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
- Re: Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
- Re: Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.
- Re: Ping: [Patch, fortran] PR24558, PR20877 and PR25047 - module function alternate entries.