J3/07-172 Date: 2007 February 15 To: J3 From: Stan Whitlock Subject: Defined operations/assignments and VOLATILE/ASYNCHRONOUS NUMBER: F03/00088 TITLE: Defined operations/assignments and VOLATILE/ASYNCHRONOUS KEYWORDS: Defined operations, defined assignment, VOLATILE, ASYNCHRONOUS DEFECT TYPE: Interpretation STATUS: J3 consideration in progress PROBLEM: Fortran 2008 Unresolved Technical issue 097 asked a question that also affects Fortran 2003. Consider this example: INTERFACE ASSIGNMENT(=) SUBROUTINE s(a,b) REAL,INTENT(OUT),VOLATILE :: a(*) REAL,INTENT(IN) :: b(:) END SUBROUTINE END REAL,POINTER :: p(:),q(:) ... CALL s(p,q) ! Violation of constraint C1233 [271:9-11], ! associating P with A p = q ! No constraint violation because ! syntax is not being used QUESTION: Did Fortran 2003 intend to enforce constraints on in defined assignment? ANSWER: Yes, the constraints and restrictions should be enforced in defined assignment and in defined operator evaluation. Edits are provided below to do this. EDITS: [262:16] add at the end of the paragraph " All restrictions and constraints that apply to actual arguments in a reference to the function also apply to the corresponding operands in the expression as if they were used as actual arguments." [263:12] insert after "the second argument." " All restrictions and constraints that apply to actual arguments in a reference to the subroutine also apply to the left-hand-side and to the right-hand-side enclosed in parenthesis as if they were used as actual arguments." SUBMITTED BY: Stan Whitlock HISTORY: J3/07-172 m179 Submitted {see 07-171 for F08 fix}