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 27, 2005, at 6:53 PM, Brooks Moses wrote:

And in looking at all the mentions INTENT(IN), I see nothing specific about requiring definition.

Me neither (though I had to go recheck to make sure). All I see is stuff saying that you can't change the definition status (or value) of an intent(in) dummy. So if it starts out undefined, it stays that way.


The restriction that would be potentially relevant is the one (I didn't track down where it is, but I know what it says) that says an undefined variable cannot be referenced. The standard's technical meaning of "reference" is in 2.5.6 of f2003 as "the appearance of the data object designator in a context requiring its value at that point during execution." As you mentioned, nothing about intent(in) says that a value is required.

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.

--
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]