To: J3 J3/16-170r1 From: Steve Lionel Subject: Procedure Actual Argument and Procedure Pointer Dummy Date: 2016 May 05 Reference: 10-007r1,16-007r1 Fortran 2008 introduced a feature allowing a non-pointer actual argument to be passed to a pointer dummy argument. The data pointer case is described in 12.5.2.7p2: "If the dummy argument does not have the INTENT (IN), the actual argument shall be a pointer. Otherwise, the actual argument shall be a pointer or a valid target for the dummy pointer in a pointer assignment statement. If the actual argument is not a pointer, the dummy pointer becomes pointer associated with the actual argument." and is mentioned in the Introduction: "An actual argument with the TARGET attribute can correspond to a dummy pointer." Furthermore, C.9.4 discusses "Pointers and targets as arguments" and describes the case of data pointers. However, Fortran 2008 also added the corresponding feature for procedure pointers, as described in 12.5.2.9p5: "If a dummy argument is a procedure pointer, the corresponding actual argument shall be a procedure pointer, a reference to a function that returns a procedure pointer, a reference to the intrinsic function NULL, or a valid target for the dummy pointer in a pointer assignment statement. If the actual argument is not a pointer, the dummy argument shall have the INTENT (IN) and becomes pointer associated with the actual argument." This new feature is not mentioned in the introduction, nor is it covered in C.9.4. (16-007 corrects the grammar in the last sentence of 12.5.2.9p5.) As there will be no more Corrigenda for Fortran 2008, it is unnecessary to process an interpretation request for this. Since the procedure case is not new in Fortran 2015, it doesn't need to be added to its Introduction, but C.9.4 needs edits to include it. Edits to 16-007r1 [552:29, C.9.4p1] After "a nonpointer variable" insert "or procedure". The sentence now reads: "If a dummy argument is declared to be a pointer the corresponding actual argument could be a pointer, or could be a nonpointer variable or procedure." [576:21, C.9.4p1] After "TARGET attribute" insert "or is a procedure,". The sentence now reads: "This only occurs when the actual argument has the TARGET attribute or is a procedure, and the dummy argument has the INTENT (IN) attribute." (The editor is welcome to wordsmith or add/remove commas as he sees fit.)