To: J3 12-181 From: Tobias Burnus Subject: Pointer arguments to PURE functions Date: September 29, 2012 References: WG5/N1830 Pre-remark: The issue was found by Ian Harvey at comp.lang.fortran. The change was done from 08-007r2 to 09-007 (in C1280); the change was proposed in 08-181 and is listed in the editor's report 09-102. ---------------------------------------------------------------------- NUMBER: TBD TITLE: Pointer arguments to PURE functions KEYWORDS: PURE function, pointer, intent(in) DEFECT TYPE: TBD STATUS: TDB QUESTION: Fortran 2003 prohibited the modification of the arguments to pure functions via C1272 In a pure subprogram any designator with a base object that is in common or accessed by host or use association, is a dummy argument of a pure function, is a dummy argument with INTENT (IN) of a pure subroutine, or an object that is storage associated with any such variable, shall not be used in the following contexts: [...] In Fortran 2008, the constraint was modified to: C1283 In a pure subprogram any designator with a base object that is in common or accessed by host or use association, is a dummy argument with the INTENT (IN) attribute, is a coindexed object, or an object that is storage associated with any such variable, shall not be used [...] Is the following procedure standard conforming and, if so, was it intented to be standard conforming? pure function f(X) real, pointer, intent(in) :: x real :: f f = 1.0 X = 2.0 end function f ANSWER: EDITS: SUBMITTED BY: Tobias Burnus