J3/05-235r1 Date: 25-July-2005 To: J3 From: Bill Long Subject: Edits for contiguous attribute References: Feature j3-043, 05-149r2, 05-186 -------------------------------------------------------------- Following are the edits to implement the j3-043 feature, the CONTIGUOUS attribute for pointers and dummy arguments. Note: < and > are used to delimit italic font. << and >> are used to delimit bold font. All page and line numbers refer to j3/04-007. EDITS ..................................................................... In the Introduction section (page xiii), the list of new Fortran 2008 features should include Better description of memory enhancements: CONTIGUOUS attribute ..................................................................... In section 1.6 Compatibility, there are no changes needed. ..................................................................... 71:20+. In the list of allowed (R503) add: or CONTIGUOUS ..................................................................... 72:29+. Add two new constraints: C512a (R501) If the CONTIGUOUS attribute is specified, the POINTER attribute shall also be specified, or the shall be an assumed-shape array. C512b (R501) If the CONTIGUOUS and POINTER attributes are specified, the shall be a data object. ..................................................................... 78:2-. Add a new subsection: 5.1.2.4a CONTIGUOUS attribute The <> specifies that an assumed-shape array is argument associated only with an object that forms a storage sequence (16.4.3.1) or that the target of an associated pointer forms a storage sequence. A pointer with the CONTIGUOUS attribute shall become associated only by successful execution of an ALLOCATE statement referencing the pointer or by pointer-assignment to a target that forms a storage sequence. If an assumed-shape array with the CONTIGUOUS attribute is argument associated, it shall be associated with an object that forms a storage sequence. The processor may need to make a contiguous copy of an actual argument associated with a dumy argument with the CONTIGUOUS attribute. Note 5.10a The CONTIGUOUS attribute allows a processor to enable optimizations that depend on the memory image of the object occupying a logically contiguous block of memory. Examples of CONTIGUOUS attribute specifications are: REAL, POINTER, CONTIGUOUS :: SPTR(:) REAL, CONTIGUOUS, DIMENSION(:,:) :: D [end Note] ..................................................................... 87:12+. Add a new subsection: 5.2.4a CONTIGUOUS statement R523a is CONTIGUOUS [::] The CONTIGUOUS statement specifies the CONTIGUOUS attribute (5.1.2.4a) for a list of objects. ..................................................................... 296:15+. Add a new function to the list in 13.5.8 of Other inquiry functions: IS_CONTIGUOUS(ARRAY) Storage sequence status ..................................................................... 325:7+. Add a description for a new intrinsic function: 13.7.56a IS_CONTIGUOUS(ARRAY) Description: Determine whether an array occupies a storage sequence. Class: Inquiry function. Argument: ARRAY may be of any type. It shall not be a scalar. It shall not be an unallocated allocatable or a pointer that is not associated. Result Characteristics: Default logical scalar. Result Value: If ARRAY occupies a storage sequence the result is .true., and is .false. otherwise. .....................................................................