J3/08-150 To: J3 From: Van Snyder Subject: Premature public comment: BLOCK construct Date: 2008 April 14 1. Introduction This comment is premature, but since we have very few papers for Meeting 184 we might wish to process it anyway. Allowing a specification part in a BLOCK construct but not in a seems designed more for aggravation or retribution, rather than to maximize ease of implementation of processors, or the likelihood that programs are correct. It would also be easier to explain if a block were a scoping unit because host association would take on much of the work. This has the additional (unavoidable) effect that the construct label of a construct can be the same as the construct label of another block because construct labels are class-1 names. 2. Suggested changes [13: 2.1.29p2] --------------------------------------------------------- Editor: Delete ", or entity ... (8.1.4)". [20: 2.1.98] ----------------------------------------------------------- Editor: Replace "or subprogram" by ", subprogram, or block". [21: 2.1.104.1] -------------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [25: 2.1.122.1] -------------------------------------------------------- Editor: Delete "or BLOCK construct". [31: 2.4.5p1] ---------------------------------------------------------- Editor: After "is invoked" insert ", or a block is executed". After "invoked procedure" insert "or executed block". After "evaluated" insert "and any subcomponents of unsaved nonpointer nonallocatable local variables for which default initialization is specified are initialized". After "order." insert "This is called <> of the specification part." After "entry point" insert ", or of the block". [31: 2.4.5p1 item 3] --------------------------------------------------- Editor: Delete because it is covered by the revised 2.4.5p1. [34: 2.5.3.1.1p2] ------------------------------------------------------ Editor: Replace the paragraph: "A local variable of a scoping unit is accessible only in that scoping unit and in any contained scoping units where it is accessible by host association (16.5.1.4)." [74: 4.5.6.3p3] -------------------------------------------------------- Editor: Replace "BLOCK construct" by "block" twice. [86: 5.2.2p2] ---------------------------------------------------------- Editor: Replace first "BLOCK construct" by "block". Replace "on entry to the procedure or BLOCK construct" by "when the specification part containing the object declaration is elaborated (2.4.5)". Replace second "procedure or BLOCK construct" by "s of the scoping unit". [91: 5.3.6.3p3] -------------------------------------------------------- Editor: Replace "at entry to the procedure" by "when the specification part containing the object declaration is elaborated (2.4.5)". Replace "of the procedure" by "execution part constructs of the scoping unit". [92: 5.3.8.2p2] -------------------------------------------------------- Editor: Replace first "BLOCK construct" by "block". Replace "at entry ... statement" by "when the of the scoping unit is elaborated (2.4.5), and therefore when the bounds' expressions, are evaluated". [98:5.3.16p2] ---------------------------------------------------------- Editor: Replace "BLOCK construct" by "" twice. Replace "the construct" by "the block". [128: 6.6.3.2p3] ------------------------------------------------------- Editor: Replace "BLOCK construct" by "block" and replace "the construct" by "its scoping unit". [128: 6.6.3.2p5] ------------------------------------------------------- Replace the paragraph, to remove "BLOCK" and "block", and to get "processor dependent order" into it: "If any references to functions whose results are either allocatable or structures with allocatable subobjects are executed during elaboration (2.4.5) of the specification part of a scoping unit, any allocatable results, and any subobjects that are allocated allocatable entities in the results returned by the functions, are deallocated in a processor-dependent order before execution of the executable constructs of the scoping unit. [129: 6.6.3.2p12] ------------------------------------------------------ Editor: Replace "BLOCK construct" by "block". [148: 7.1.11p1 ] ------------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [148: 7.1.11p2(5-6) ] -------------------------------------------------- Editor: Delete the items because they are covered by item (4), because a block is now a scoping unit. [169: 8.1.1p2 R801] ---------------------------------------------------- Editor: Replace R801: R801 <> [ ] [ ] ... [169:8.1.2.2p1] -------------------------------------------------------- Editor: Replace "with the" by "with elaboration (2.4.5) of the of the block, followed by" [171: 8.1.4p1 C806-C808] ----------------------------------------------- Editor: Throughout C806-C808, replace "R807" by "R801" and replace "BLOCK construct" by "". Then move the constraints to be after the revised R801 at [169: 8.1.1p2]. [172: 8.1.4p2] --------------------------------------------------------- Editor: Replace "BLOCK ... (16.4)" by " declare entities whose scope is the ". Then move the paragraph to follow 8.1.1p2. [172: 8.1.4p3] --------------------------------------------------------- Delete because it is covered by the revised 8.1.2.2. [187: 8.5.1p2 item 6] -------------------------------------------------- Editor: Delete ", END BLOCK,", then insert another item: "o Any statement that completes execution of a block (8.1.2.2) and results in implicit deallocation of a coarray." [268-269: 11.2.2p2] ---------------------------------------------------- Editor: Delete "or BLOCK construct" thrice because a block is now a scoping unit. [308: 12.7 C1276] ------------------------------------------------------ Editor: Replace "BLOCK construct" by "scoping unit". [442: 16.4p1] ---------------------------------------------------------- Editor: Delete the last sentence, "An entity ... construct entity." because entities in blocks are no longer construct entities. [444: 16.5.1.4p1] ------------------------------------------------------ Editor: After "submodule subprogram" insert ", a block". At the end of the paragraph insert a new sentence "In addition, statement labels and construct labels of the host of a block are accessed within the block by host association." [444: 16.5.1.4p3] ------------------------------------------------------ Editor: After "subprogram" insert "or block". [448: 16.5.2.5p1(6)] --------------------------------------------------- Editor: Replace "BLOCK construct" by "block" (or "scoping unit"?). [448: 16.5.2.5p1(9)] --------------------------------------------------- Editor: Replace "BLOCK construct" by "block" (or "scoping unit"?). Replace "construct entity of that construct" by "entity of that block" (or "scoping unit"?). [454: 16.6.5p1(22)] ---------------------------------------------------- Replace "Invocation of a procedure" by "Elaboration (2.5.4) of a specification part". [454: 16.6.5p1(27)] ---------------------------------------------------- Editor: Delete because it is now covered by 16.6.5p1(22). [459: A.2] ------------------------------------------------------------- Editor: Insert a new item after (5.3.7) -- second from the bottom: "o the order of deallocation of allocatable results, or allocatable subobjects of results, of functions executed during elaboration (2.4.5) of specification parts (6.6.3.2);" 3. Additional change Allow statement labels and construct labels in a to be the same as one in its host, or one in a different . [444: 16.5.1.4p3] ------------------------------------------------------ Editor: Before "Local identifiers" insert "A statement label of a statement within a block is a local identifier in the block; any statement label of the host that has the same value is inaccessible within the block."