This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]