To: J3 11-199 From: R. Bader Subject: the CONTIGUOUS attribute Date: 2011 June 13 Reference: N1830 NUMBER: F08/xxxx TITLE: Description of the CONTIGUOUS attribute misworded? KEYWORDS: interfaces, attributes DEFECT TYPE: Request for interpretation STATUS: J3 consideration in progress Consider the following code: module mod_cont contains subroutine fcont(x) real, contiguous :: x(:) integer :: i x = (/ (real(i),i=1,size(x)) /) end subroutine fcont end module mod_cont program cont use mod_cont implicit none real :: x(45) call fcont(x(1::3)) end program 5.3.7 para 1 says: "The CONTIGUOUS attribute specifies that an assumed-shape array can only be argument associated with a contiguous effective argument, or that an array pointer can only be pointer associated with a contiguous target." QUESTION: Is this program standard conforming? ANSWER: Yes. While the first part of the above sentence appears to imply that this is not the case, there is no actual normative text which forbids it. The intention was to enforce copy-in/out in all cases where a non-contiguous actual argument is used. The second part of the sentence is covered by 7.2.2.3 para 7. The edits below attempt to state this in a more clear manner. EDITS: [93, before C530] insert "A contiguous array is an object whose subsequent array elements are not separated by another object. The CONTIGUOUS attribute specifies contiguity of entities for which this property is not otherwise determinable." [93, para 1] delete paragraph. [93, NOTE 5.10] at the end of the NOTE, add following text "For the assumed shape array D, the processor must assure contiguity by performing copy-in / copy-out of the actual argument if it is not contiguous. For pointer association of SPTR the programmer is required to specify a contiguous target (7.2.2.3), or, if SPTR is itself a dummy argument, a simply contiguous actual argument (12.5.2.7)."