[PATCH] Fix EQUIVALENCE vs. SAVE (PR fortran/18518)

Richard E Maine Richard.Maine@nasa.gov
Thu Sep 29 19:45:00 GMT 2005


On Sep 29, 2005, at 11:07 AM, Richard E Maine wrote:

>
> On Sep 29, 2005, at 10:48 AM, Brooks Moses wrote:
>
>> Richard E Maine wrote:
>>> For reinforcement, note the penultimate para of 2.5.6 in f2003
>>>     "The appearance of a data object designator...in an actual 
>>> argument list does not constitute a reference to that data object... 
>>> unless such a reference is necessary to complete the specification 
>>> of the actual argument."
>>> The "unless" bit doesn't apply here. That's for... um.... I'm having 
>>> trouble recalling or coming up with an example right at the moment 
>>> (because coffee not finished?) ... but anyway, it's not this case.
>>
>> Would it be applying to things like an assumed-shape arrays, where 
>> the actual argument needs to be referenced to determine the size of 
>> the dummy argument (at least if the actual argument is allocatable)?
>
> Yes. At least that general kind of thing. Though I don't think quite 
> exactly that, as the array doesn't have to be defined for that one. 
> The value of the array isn't needed there - just the shape. Gotta run 
> right now, so can't spend time thinking up a full example. But, yes, 
> along that general line anyway.

I thought of an example after leaving my desk after the above email. If 
you pass x(1:n) as an actual argument, that is a reference to n because 
the value of n is needed to specify what the actual argument is.

-- 
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                             |        -- Mark Twain



More information about the Gcc-patches mailing list