[Bug fortran/49509] cannot promote types for arguments passed by value
sgk at troutmask dot apl.washington.edu
gcc-bugzilla@gcc.gnu.org
Thu Jun 23 04:14:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49509
--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-06-23 04:13:49 UTC ---
On Thu, Jun 23, 2011 at 03:23:26AM +0000, stevenj at alum dot mit.edu wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49509
>
> --- Comment #4 from stevenj at alum dot mit.edu 2011-06-23 03:23:06 UTC ---
> Section 12.4.1.2 of Fortran 2003 standard:
> "If the dummy argument has the VALUE attribute it becomes associated with a
> definable anonymous data object whose initial value is that of the actual
> argument."
I believe you are misintrepreting the meaning of "defineable
anonymous data object". This does not mean that TKR does
not apply. It means, well, the data object is definable
and it is anonymous to the calling procedure. That is, the
calling procedure has no means to getting at anything that
might affect the value of the dummy argument.
> Furthermore, NOTE 12.22 says:
NOTEs in the standard are non-normative text.
> "If the VALUE attribute is specified, the effect is as if the actual argument
> is assigned to a temporary, and the temporary is then argument associated with
> the dummy argument. The actual mechanism by which this happens is determined
> by the processor."
This note does not remove the requirement of TKR.
> It is unfortunate that it is not explicit on this point,
> however -- one could argue that there is a bug in the
> standard here.
Feel free to post to comp.lang.c about the issue. The
technical editor of F2003 routinely answers questions
about the standard as do others who are current members
of J3 or former members of J3.
More information about the Gcc-bugs
mailing list