This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR44582 - gfortran generates wrong results due to wrong ABI in function with array return
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Mikael Morin <mikael dot morin at sfr dot fr>, fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>, burnus at gcc dot gnu dot org, yin at absoft dot com
- Date: Tue, 29 Jun 2010 00:32:06 +0200
- Subject: Re: [Patch, fortran] PR44582 - gfortran generates wrong results due to wrong ABI in function with array return
- References: <AANLkTil-gqzM_IUMoJVCsgKtV4ymWgOSotoMa39oCWFQ@mail.gmail.com> <4C290991.6050802@sfr.fr> <4C29113D.9050605@net-b.de>
Dear All,
>
> Thus, I think the patch is OK. Do you agree?
>
> "12.5.2.4 Ordinary dummy variables" (F2008) has:
> "If a dummy argument has INTENT (OUT) or INTENT (INOUT), the actual
> argument shall be definable. If a dummy argument has INTENT (OUT), the
> actual argument becomes unde ned at the time the association is
> established, except for direct components of an object of derived type
> for which default initialization has been specified."
>
> "12.5.2.13 Restrictions on entities associated with dummy arguments"
> "While an entity is associated with a dummy argument, the following
> restrictions hold. [...]
> (3) Action that affects the value of the entity or any subobject of it
> shall be taken only through the
> dummy argument unless [...]
> (4) If the value of the entity or any subobject of it is affected
> through the dummy argument, then at
> any time during the invocation and execution of the procedure, either
> before or after the de nition,
> it may be referenced only through that dummy argument [...]"
What's the verdict??
Paul