To: J3 J3/18-264r1 From: Van Snyder, Bill Long Subject: Inconsistencies between LOCAL and BLOCK Date: 2018-October-15 Introduction ============ C1128 prohibits a variable with LOCAL locality from having the ALLOCATABLE attribute, from being finalizable, or from being a coarray. 11.1.7.5p1 specifies that a variable with LOCAL locality is a different entity in every iteration of a DO CONCURRENT construct, and further specifies that a construct entity within the DO CONCURRENT construct is ... "similar to LOCAL locality" (but not "as if LOCAL locality"). C1128 does not prohibit a variable declared within a BLOCK construct within a DO CONCURRENT construct from having the ALLOCATABLE attribute, from being finalizable, or from being a coarray. This is an oversight. There should be additional limitations applied to construct entities declared in a BLOCK construct that executes during an iteration of a DO CONCURRENT construct. We agree that ALLOCATABLE should be allowed in both cases. The final subroutines for finalizable variables should be required to be pure. Edits ===== [181:22 C1128 (eighth constraint after syntax rules in 11.1.7.2 Form of the DO construct] remove the restriction on ALLOCATABLE variables and permit finalizable variables as long as the final subroutine is pure. Making the whole constraint read: C1128 A that appears in a LOCAL or LOCAL_INIT shall not have the INTENT (IN) or OPTIONAL attribute, shall not be of a finalizable type that has an impure final procedure, shall not be a nonpointer polymorphic dummy argument, and shall not be a coarray or an assumed-size array. A that is not permitted to appear in a variable definition context shall not appear in a LOCAL or LOCAL_INIT . [182:1+] At the end of 11.1.7.2 Form of the DO construct add a new paragraph: "A variable that is declared in a BLOCK construct that executes as part of an iteration of a DO CONCURRENT construct shall not be of a finalizable type that has an impure final procedure and shall not be a coarray."