J3/05-149 To: J3 From: Dan Nagle Subject: Sequence Pointers Date: 2005 Jan 24 A pointer with the SEQUENCE attribute must point to a contiguous target. Number: Title: sequence pointers Submitted By: J3 Status: For Consideration References: J3/04-132 Basic Functionality: Rationale: Many unnecessary operations, especially copies, happen because compilers must have a data item occupying contiguous memory. For example, contiguous memory is needed to pass an array to a procedure with an implicit interface. Thus, the mere use of pointers often results in substantially suboptimal code. If the compiler knew that the pointer was constrained to point to contiguous memory, very much better code could be generated. Estimated Impact: the effort was estimated as 5 on the John Reid scale at M167. Detailed Specification: Provide a way to specify that a pointer will only be associated with a target occupying a storage sequence. For example, a SEQUENCE keyword may appear on the pointer's declaration statement. Thus, real, pointer, sequence :: sptr Alternatively, the pointer keyword might be omitted, since this proposal only allows SEQUENCE on POINTER declarations. However, this may not be desirable if other objects, such as dummy arguments, might eventaully be allowed ot have the sequence keyword. History: J3/04-132