------- Comment #2 from David at ham dot dropbear dot id dot au 2006-05-23 18:18 ------- (In reply to comment #1) > Is this standard conforming?
I've got the May 2004 draft Fortran 2003 standard from the WG5 archive. Hopefully it says the same thing as F95 and final F2003. I presume that we're just talking about whether: size(element%numbering%number2count, 1) Is a legal specification expression. Under section 7.1.6 in my draft standard, a specification is a restricted expression which includes (7) a specification inquiry whose function arguments are (7)(a) a restricted expression. Now, under specification inquiries, (1) is an array inquiry function so size is allowed as long as its arguments are resticted expressions. Restricted expressions include "(2) An object designator with a base object that is a dummy argument that has neither the OPTIONAL nor the INTENT (OUT) attribute," Under 2.5.1 "An object designator is a designator for a data object" and "A designator is a name followed by zero or more component selectors, array section selectors, array element selectors, and substring selectors." So element%numbering%number2count is an object designator. Under 6.1.2 The base object of a data-ref is the data object whose name is the leftmost part name. So element is the base part. Since element is intent(in) (ie not intent(out)) and not optional, element%numbering%number2count is a restricted expression. So yes, on that basis I think the example is standard conforming. Cheers, David -- David at ham dot dropbear dot id dot au changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |David at ham dot dropbear | |dot id dot au http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27709