J3/05-014 To: J3 From: Malcolm Cohen Subject: Cumulative edits for F2008 development Date: 2005/10/21 1. Introduction =============== This contains the combined edits from all passed papers at m173, plus the "enhanced module" TR 19767, plus the editor's report thereof 05-169 (the latter changes some edits and deletes others). Some typos in the papers have been corrected in this list. Some comments appear. All edits appear in page and line number order. There will not be a combined document with them separated out into "feature" order; refer to the original papers for that information. 2. List of papers ================= >From meeting 169: TR 19767 (04-324). >From meeting 171: 05-169 (Editor's report on TR 19767). These are not separated out from TR 19767. >From meeting 173: 05-194r1, 05-196, 05-198r1, 05-199r2, 05-200r1, 05-201r2, 05-202r1, 05-204r2, 05-205r2, 05-210r2, 05-231r4, 05-232r1, 05-233r2, 05-234r2, 05-237r3, 05-240r4. 3. List of edits ================ 05-234r2: [xiii] Introduction, the list of new Fortran 2008 features should include "The maximum rank of an array has been increased from seven to fifteen." 05-237r3: [xiii] Introduction, the list of new Fortran 2008 features should include "Performance enhancements: The DO CONCURRENT construct, which allows loop iterations to be executed in any order or potentially concurrently." TR 19767: [9:12+] 2.1 High level syntax, BNF R202 , after "<> " insert "<> ". TR 19767: [9:34+] 2.1, after BNF R1104 , insert new BNF rule "R1115a <> [ ] [ ] " 05-196: [10:24] 2.1 High level syntax, BNF for R210 , Delete first "" . 05-196: [10:29] 2.1 High level syntax, BNF for R1107 , Delete first "". TR 19767: [10:32+] 2.1, BNF for , add another alternative: "<> ". TR 19767: [11:41] 2.2 Program unit concepts, first paragraph, second sentence, after "module" insert ", a submodule". TR 19767: [11:43] 2.2, first paragraph, after the fourth sentence, (before "A block data ...") insert new sentence "A submodule is an extension of a module; it may contain the definitions of procedures declared in a module or another submodule." TR 19767: [11:45] 2.2, first paragraph, seventh sentence, between "module" and ", or another subprogram", insert ", a submodule". TR 19767: [11:47] 2.2, first paragraph, last sentence, between "module" and "but", insert "or submodule". TR 19767: [12:28] 2.2.3.2 Module procedure, second sentence, between "module" and "containing", insert "or submodule". TR 19767: [13:17+] After subclause 2.2.4 Module, insert new subclause: "2.2.5 Submodule A <> is a program unit that extends a module or another submodule. It may provide definitions (12.5) for procedures whose interfaces are declared (12.3.2.1) in an ancestor module or submodule. It may also contain declarations and definitions of other entities, which are accessible in descendant submodules. An entity declared in a submodule is not accessible by use association unless it is a module procedure whose interface is declared in the ancestor module. Submodules are further described in Section 11. Note 2.2a The scoping unit of a submodule accesses the scoping unit of its parent module or submodule by host association.". TR 19767: [14] 2.3.2 Statement order, Table 2.1, first row (second line), after "MODULE" insert ", SUBMODULE". TR 19767: [14] 2.3.2, Table 2.2, third column, heading, change "Module" to "Module or Submodule". TR 19767: [14] 2.3.2, Table 2.2, second footnote, - change "a module" to "a module or submodule" - change "the module" to "it". TR 19767: [14:2,4,6] 2.3.3 The END statement, - first sentence, after " insert "", and after "" insert ""; - third sentence, replace "and " by ", and ". - first sentence, replace "or " by ", , or ". TR 19767: [15:2] 2.3.3, last paragraph, after "", insert " <>..."), "The decimal precision of double precision real shall be at least 10, and its decimal exponent range shall be at least 37. It is recommended that the decimal precision of default real be at least 6, and that its decimal exponent range be at least 37." TR 19767: [46:10] 4.5.1.1 Accessibility, third paragraph, after "the definition" insert ", and within its descendant submodules". TR 19767: [46:10+7] 4.5.1.1, Note 4.18, after "defined", insert ", and within its descendant submodules". TR 19767: [55:10] 4.5.3.6 Component accessibility, last paragraph (immediately before Note 4.38), after "definition", insert ", and within its descendant submodules". TR 19767: [55:10+17] 4.5.3.6, Note 4.40, last sentence, after "only within the module" insert ", and within its descendant submodules". Also, delete the MODULE and END MODULE statements from the example code. TR 19767: [56:1--] 4.5.3.6, Note 4.41, last sentence, after "definition" insert ", and within its descendant submodules". 05-196: [56:4] 4.5.4 Type-bound procedures, BNF R448 , delete the first "". TR 19767: [58:8] 4.5.4 Type-bound procedures, last paragraph, last sentence, after "definition" insert ", and within its descendant submodules". TR 19767: [59:23-24] 4.5.5.2 When finalization occurs, second paragraph, second sentence, - after "defined in a module" insert " or submodule,"; - after "referencing the module" insert "or accessing the submodule". TR 19767: [60:4+5] 4.5.5.2, Note 4.48, second paragraph, - after the first "module" insert "or submodule"; - after the second "module" insert "or accessing the submodule". 05-201r2: [71:9-12] 5.1 Type declaration statements, BNF R502 , Insert a second alternative "<> TYPE ( )" giving "R502 <> <> TYPE ( ) <> TYPE ( ) <> CLASS ( ) <> CLASS ( * ) " 05-201r2: [75:7] Within the first paragraph of 5.1.1.1 TYPE replace "a derived" by "an intrinsic or derived". 05-201r2: [75:8] Replace "Where ... specifier" by "In a that specifies a derived type". 05-194r1: [78:13+] 5.1.2.5 DIMENSION attribute, BNF for R510 , after "<> ", insert "<> ". 05-234r2: [78:14] 5.1.2.5 DIMENSION attribute, first constraint C541 replace "seven" with "fifteen", making the whole constraint: "C541 (R510) The maximum rank is fifteen." 05-194r1: [78:14+8+] 5.1.2.5 DIMENSION attribute, Note 5.11, append a new line of example: "REAL, PARAMETER :: V(0:*) = [0.1, 1.1] ! Implied-shape array" 05-194r1: [80:35+] Insert a new subclause immediately before 5.1.2.6 EXTERNAL attribute: "5.1.2.5.5 Implied-shape array An <> is a named constant that takes its shape from the in its declaration. An implied-shape array is declared with an . R516a <> [ : ] * C544a (R516a) An implied-shape array shall be a named constant. The rank of an implied-shape array is the number of s in the . The extent of each dimension of an implied-shape array is the same as the extent of the corresponding dimension of the . The lower bound of each dimension is , if it appears, and 1 otherwise; the upper bound is one less than the sum of the lower bound and the extent." 05-210r2: [81:35] 5.1.2.7 INTENT attribute, fourth paragraph after C546 -- the one that begins "If no INTENT..." -- replace "associated actual argument" by "argument associated entity". TR 19767: [84:3] 5.1.2.12 PROTECTED attribute, second paragraph, first line, after "attribute," insert "or within any of its descendant submodules,". TR 19767: [84:14,16] 5.1.2.13 SAVE attribute, throughout second paragraph, change both occurrences of "module" to "module or submodule". 05-200r1: [103:13+] 6 Use of data objects, BNF for R603 , after "<> " insert a new line "<> ". 05-200r1: [106:2+] Immediately before 6.1.3 Type parameter inquiry, insert new subclause: "6.1.2a Complex parts A <> is used to designate the real or imaginary part of a complex data object, independently of the other part. R614a <> % RE <> % IM C615a (R614a) The shall be of complex type. If is %RE it designates the real part of . If it is %IM it designates the imaginary part of . The type of a is real, and its kind and shape are those of the . Note 6.6a The following are examples of complex part designators: impedance%re !-- Same value as REAL(impedance) fft%im !-- Same value as AIMAG(fft) x%im = 0.0 !-- Sets the imaginary part of X to zero 05-234r2: [108:6+] 6.2.2.2 Array element order, Table 6.1, In the second to bottom box: In the "Rank" column, change "7" to "15" In the Subscript bounds column, change the subscripts on the final j and k from "7" to "15" In the Subscript list column, change the subscript on the final s from "7" to "15" In the Subscript order value column, in the fifth line, change the subscripts on s and j from "7" to "15", and the subscript on d from "6" to "14"; in the sixth line, change the subscript on the first d from "5" to "13". In the bottom (Notes) box, in the last line, change "7" to "15". TR 19767: [113:18] 6.3.1.1 Allocation of allocatable variables, penultimate paragraph, third sentence replace "module or a subobject thereof" by "module or submodule, or a subobject thereof,". TR 19767: [115:9-10] 6.3.3.1 Deallocation of allocatable variables, third paragraph (the one after Note 6.23), throughout, replace both occurrences of "module" by "module or submodule". 05-198r1: [138:18] 7.4.1.2 Intrinsic assignment statement, end of first paragraph, replace " shall not be polymorphic" by "if is polymorphic it shall be allocatable". 05-198r1: [139:1] 7.4.1.2 Intrinsic assignment statement, numbered list, beginning of item (3), replace "The" by "If is polymorphic it shall be type compatible with and have the same rank. Otherwise the". 05-198r1: [139:2+8-11] 7.4.1.2 Intrinsic assignment statement, Table 7.8, first line of the "derived type" row, - delete "and kind parameters" and the semicolon. - then delete the last three lines of Table 7.8 (which reappear in the next edit).] 05-198r1: [139:3-] 7.4.1.2 Intrinsic assignment statement, numbered list, insert a fourth item: "(4) If is of derived type each length type parameter of shall have the same value as the corresponding type parameter of unless is allocatable and its corresponding type parameter is deferred, and each kind type parameter of shall have the same value as the corresponding type parameter of ." 05-198r1: [139:23] 7.4.1.3 Interpretation of intrinsic assignments, third paragraph (which begins "If is an allocated...", - replace "or" by a comma; - after "differ" insert ", or if the dynamic type of and differ". 05-198r1: [139:25] 7.4.1.3 Interpretation of intrinsic assignments, third paragraph, delete the instance of "and" before "with each lower bound ...". 05-198r1: [139:26] 7.4.1.3 Interpretation of intrinsic assignments, third paragraph, after "LBOUND()" insert ", and with the same dynamic type as ". 05-202r1: [144:5] Within the penultimate constraint (C727) of 7.4.2 Pointer assignment, after "external" insert ", internal", making the constraint read: "C727 (R742) A shall be the name of an external, internal, module or dummy procedure, a specific intrinsic function listed in 13.6 and not marked with a bullet (O), or a procedure pointer." 05-202r1: [144:36-38] After the first paragraph of 7.4.2.2 Procedure pointer assignment, insert a new paragraph "If is the name of an internal procedure the <> of becomes the innermost currently executing instance of the host procedure. Otherwise if has a host instance the host instance of becomes that instance. Otherwise has no host instance." 05-237r3: [164:3] 8.1.6 DO construct, first paragraph, second sentence, replace "The EXIT and CYCLE statements" with: "The EXIT statement, except in a DO CONCURRENT construct, and the CYCLE statement" 05-237r3: [164:6] 8.1.6 DO construct, second paragraph, second sentence, replace "In either case," with: "Except in the case of a DO CONCURRENT construct," 05-237r3: [164:8+] 8.1.6 DO construct, after the second paragraph, insert new paragraph: "A <> construct is a DO construct with a of [,] CONCURRENT ." 05-237r3: [165:15+] 8.1.6.1.1, Form of the block DO construct, R830 , add a new line at the end of R830 "<> [,] CONCURRENT " 05-237r3: [167:7+] 8.1.6.4.1 Loop initiation, before the last paragraph insert new paragraphs: "For a DO CONCURRENT construct, the values of the index variables for the iterations of the construct are determined by the rules for the index variables of the FORALL construct (7.4.4.2.1 and 7.4.4.2.2). The number of distinct index value combinations in the active combination of values is the iteration count for the construct. An in a DO CONCURRENT construct has a scope of the construct (16.3). It is a scalar variable that has the type and type parameters that it would have if it were the name of a variable in the scoping unit that includes the DO CONCURRENT, and this type shall be integer type; it has no other attributes." 05-237r3: [167:10] 8.1.6.4.2 The execution cycle, first sentence, replace "The <> of a DO construct consists of" with: "The <> of a DO construct that is not a DO CONCURRENT construct consists of" 05-237r3: [167:23+] 8.1.6.4.2 The execution cycle, append a new paragraph: "The range of a DO CONCURRENT construct is executed for all of the active combinations of the values. Each execution of the range is an <>. The executions may occur in any order." 05-237r3: [167:25] 8.1.6.4.3 CYCLE statement, first sentence, replace "Step (2) in the above execution cycle may be curtailed" with: "Execution of the range of the loop may be curtailed" 05-237r3: [167:29+] 8.1.6.4.3 CYCLE statement, after constraint C828, add a new constraint: "C828a (R843) A shall not appear within the range of a DO CONCURRENT construct if it belongs to a construct that contains the DO CONCURRENT construct." 05-237r3: [167:33] 8.1.6.4.3 CYCLE statement, penultimate paragraph, beginning of the first sentence, replace "Execution of a CYCLE statement causes" with: "Execution of a CYCLE statement that belongs to a DO construct that is not a DO CONCURRENT construct causes" 05-237r3: [167:34] 8.1.6.4.3 CYCLE statement, penultimate paragraph, after the first sentence, add a new sentence: "Execution of a CYCLE statement that belongs to a DO CONCURRENT construct curtails that iteration of the construct." 05-205r2: [168:4-10] 8.1.6.4.4 Loop termination, Delete the first two paragraphs and the syntax rules for EXIT. NOTE: EDIT CONFLICT 05-237r3: [168:7+] 8.1.6.4.4 Loop termination, after constraint C829, add a new constraint "C829a (R844) An shall not belong to a DO CONCURRENT construct, nor shall it appear within the range of a DO CONCURRENT construct if it belongs to a construct that contains that DO CONCURRENT construct." NOTE: EDIT CONFLICT 05-205r2: [168:11] 8.1.6.4.4 Loop termination, third textual paragraph, Change "The loop" to "A loop". NOTE: EDIT OVERLAP - edit from 05-237r3 takes precedence. 05-237r3: [168:11] 8.1.6.4.4 Loop termination, beginning of the sentence before the list of items, replace "The loop terminates" with: "For a DO construct that is not a DO CONCURRENT construct, the loop terminates" NOTE TO EDITOR: EDIT OVERLAP. 05-205r2: [168:16] 8.1.6.4.4 Loop termination, numbered list, item (3), change "outer DO construct" to "outer construct". 05-237r3: [168:23+] 8.1.6.4.4 Loop termination, append new paragraph: "For a DO CONCURRENT construct, the loop terminates, and the DO construct becomes inactive when all of the iterations have completed execution." 05-237r3: [168:24-] Between subclauses "8.1.6.4.4 Loop termination" and "8.1.6.5 Examples of DO constructs", insert a new subsection (containing 2 notes): "8.1.6.4a Restrictions on DO CONCURRENT constructs A statement in the loop range shall not cause a branch out of the construct. A variable that is referenced in an iteration shall either be previously defined during that iteration, or shall be defined or become undefined during any other iteration of the current execution of the construct. A variable that is defined or becomes undefined by more than one iteration of the current execution of the construct becomes undefined when the current execution of the construct terminates. A pointer that is referenced in an iteration either shall be previously pointer associated during that iteration, or shall not have its pointer association changed during any iteration. A pointer that has its pointer association changed in more than one iteration has a processor dependent association status when the construct terminates. An allocatable object that is allocated in more than one iteration shall be subsequently deallocated during the same iteration in which it was allocated. An object that is allocated or deallocated in only one iteration shall not be deallocated, allocated, referenced, or become undefined in a different iteration. An input/output statement shall not write data to a file record or position in one iteration and read from the same record or position in a different iteration of the same execution of the construct. Records written by output statements in the loop range to a sequential access file appear in the file in an indeterminate order. Procedures referenced in the loop range shall be PURE. If the IEEE_EXCEPTIONS intrinsic module is accessible, calls to the IEEE_GET_FLAG, IEEE_SET_HALTING_MODE, and IEEE_GET_HALTING_MODE subroutines shall not appear in the loop range. Note 8.15a The restrictions on referencing variables defined in an iteration of a DO CONCURRENT construct apply to any procedure invoked within the loop. [end Note] Note 8.15b The restrictions on the statements in the loop range of a DO CONCURRENT construct are designed to ensure there are no data dependencies between iterations of the loop. This permits code optimizations that might otherwise be difficult or impossible because they would depend on characteristics of the program not visible to the compiler. [end Note]" 05-237r3: [169:1--] 8.1.6.5 Examples of DO constructs, after Note 8.18, add a new note: "Note 8.18a The following example represents a case in which the user knows that the elements of the array IND form a permutation of the integers 1..N. The DO CONCURRENT construct will allow the compiler to generate vector gather/scatter code, unroll the loop, or parallelize the code for this loop, significantly improving performance. INTEGER :: A(N,N),IND(N) DO CONCURRENT (I=1:N, J=1:N) A(IND(I),IND(J)) = A(IND(I),IND(J)) + 1 END DO" 05-205r2: [169:1-] Immediately before 8.2 Branching, insert new subclause "8.1.7 EXIT statement The EXIT statement provides one way of terminating a construct. R844 <> EXIT [ ] C829 (R844) If an refers to a , it shall be within that construct; otherwise, it shall be within the range of at least one . An EXIT statement belongs to a particular construct. If the EXIT statement refers to a construct name, it belongs to that construct; otherwise, it belongs to the innermost DO construct in which it appears. When an EXIT statement that belongs to a DO construct is executed, it terminates the loop (8.1.6.4.4) and any active loops contained within the terminated loop. When an EXIT statement that belongs to a non-DO construct is executed, it terminates any active loops contained within that construct, and completes execution of that construct. 05-231r4: [170:22-24] 8.4 STOP Statement, Replace R850 and C834 with: "R850 <> <> C834 (R850) The shall be of default kind. C834a (R850) The shall be of default kind." 05-231r4: [170:26-27] 8.4 STOP Statement, First textual paragraph, delete the second sentence which reads "Leading zero digits ... are not significant." 05-231r4: [170:29+] 8.4 STOP statement, end of subclause, append new paragraph and note: "It is recommended that the is made available by formatted output to the processor-dependent external unit identified by the named constant ERROR_UNIT of the ISO_FORTRAN_ENV intrinsic module (Section 9.4). Note 8.21+ If the is an integer, it is recommended that the value also be used as the process exit status, if the operating system supports that concept. If the integer is used as the process exit status, the operating system might be able to interpret only values within a limited range, or only a limited portion of the integer value (for example, only the least-significant 8 bits)." TR 19767: [249:3] 11 Program units, first paragraph, second sentence, after "module", insert ", a submodule". TR 19767: [249:4] 11 Program units, second paragraph, first sentence, after "modules" insert ",submodules". 05-196: [250:14] 11.2 Modules, BNF R1107 "", Delete first "". TR 19767: [250:17+] 11.2 Modules, BNF R1108 , add another alternative "<> ". TR 19767: [251:8] 11.2.1 The USE statement and use association, first paragraph, append "A submodule shall not reference its ancestor module by use association, either directly or indirectly. Note 11.6a It is possible for submodules with different ancestor modules to access each others' ancestor modules by use association.". TR 19767: [253:2-] Immediately before 11.3 Block data program units, insert new subclause "11.2.2 Submodules A <> is a program unit that extends a module or another submodule. The program unit that it extends is its <>, and is specified by the in the . A submodule is a <> of its parent. An <> of a submodule is its parent or an ancestor of its parent. A <> of a module or submodule is one of its children or a descendant of one of its children. The <> is the ordered pair whose first element is the ancestor module name and whose second element is the submodule name. Note 11.6b A module and its submodules stand in a tree-like relationship one to another, with the module at the root. Therefore, a submodule has exactly one ancestor module and may optionally have one or more ancestor submodules. {end note} A submodule accesses the scoping unit of its parent by host association. A submodule may provide implementations for module procedures, each of which is declared by a module procedure interface body (12.3.2.1) within that submodule or one of its ancestors, and declarations and definitions of other entities that are accessible by host association in descendant submodules. R1115a <> [ ] [ ] R1115b <> SUBMODULE ( ) R1115c <> [ : ] R1115d <> END [ SUBMODULE [ ] ] C1114a (R1115a) An automatic object shall not appear in the of a submodule. C1114b (R1115a) A submodule shall not contain a \obs{or a }. C1114c (R1115a) An object with default initialization that is declared in the of a submodule shall have the ALLOCATABLE, POINTER, or SAVE attribute. C1114d (R1115c) The shall be the name of a nonintrinsic module; the shall be the name of a descendant of that module. C1114e (R1115a) If a is specified in the , it shall be identical to the specified in the .". TR 19767: [257:13] 12.3 Procedure interface, first paragraph, last sentence, after "units" insert ", except that for a separate module procedure body ({ref to new 12.5.2.4}), the dummy argument names, binding label, and whether it is recursive shall be the same as in its corresponding module procedure interface body (12.3.2.1)". TR 19767: [259:20] 12.3.2.1 Interface block, penultimate constraint (C1210), after "allowed only in an " insert "that is not a module procedure interface body". TR 19767: [259:30+] 12.3.2.1, after third paragraph after the last constraint (C1211) (i.e. after "; otherwise, it is an external procedure.") insert new paragraph and constraints: "A <> is an interface body whose initial statement contains the keyword MODULE. It declares the <> for a separate module procedure ({ref new 12.5.2.4}). A separate module procedure is accessible by use association if and only if its interface body is declared in the specification part of a module and is public. If a corresponding ({ref new 12.5.2.4}) separate module procedure is not defined, the interface may be used to specify an explicit specific interface but the procedure shall not be used in any way. C1212b (R1227) A module procedure interface body shall not appear in an abstract interface block.". 05-202r1: [267:15-17] 12.4 Procedure reference, fifth constraint C1229 after BNF R1222 , Replace whole constraint ("A ... bullet(o).") by "C1229 (R1221) A shall be the name of an external, internal, module or dummy procedure, a specific intrinsic function listed in 13.6 and not marked with a bullet (o), or a procedure pointer." 05-202r1: [267:17+1-7] 12.4 Procedure reference, first note 12.16, Delete entire note ("Note 12.16 This standard does not allow..."). 05-210r2: [268:1-15] 12.4.1 Actual arguments, dummy arguments, and argument association, throughout first paragraph, use "correspond" in the appropriate form instead of "associate". In detail: - Replace "is associated with" by "corresponds to" at [268:5], [268:7-8], [268:9], and [268:10]. - Replace "be associated with" by "correspond to" at [268:13], [268:14], and [268:15]. 05-210r2: [268:15+] 12.4.1, after the first paragraph, add a new paragraph: "Except in references to intrinsic inquiry functions, if the dummy argument is not a pointer and the corresponding actual argument is a pointer, the actual argument shall be pointer associated with a target and the dummy argument becomes argument associated with that target. Otherwise the dummy argument becomes argument associated with the corresponding actual argument." 05-210r2: [269:20-22] 12.4.1.2, Delete the paragraph that begins "Except in references to intrinsic inquiry functions...." 05-210r2: [270:38-39] 12.4.1.2, paragraph beginning "If a nonpointer dummy argument has INTENT(OUT)..." - replace "actual argument" by "argument associated entity" - replace "corresponding actual argument by "argument associated entity". 05-202r1: [271:12+] 12.4.1.3 Actual arguments associated with dummy procedure entities, Insert a new first paragraph: "If the actual argument is the name of an internal subprogram, the host instance of the dummy argument is the innermost currently executing instance of the host of that internal subprogram. If the actual argument has a host instance the host instance of the dummy argument is that instance. Otherwise the dummy argument has no host instance." 05-202r1: [271:16] 12.4.1.3 Actual arguments associated with dummy procedure entities, second paragraph, first sentence, after "external" insert ", internal". 05-200r1: [273:1-2] 12.4.1.6 Restrictions on dummy arguments not present, item (5) in the second numbered list, change "component ... substring selector" to "subobject selector". TR 19767: [280:3+] 12.5.2.1 Function subprogram, BNF R1228 , append another alternative "<> MODULE". TR 19767: [280:7+] 12.5.2.1, between constraint C1242 and BNF R1229 , insert "C1242a (R1227) MODULE shall appear only within the or of a module subprogram or of an interface body that is declared in the scoping unit of a module or submodule. C1242b (R1227) If MODULE appears within the in a module subprogram, an accessible module procedure interface having the same name as the subprogram shall be declared in the module or submodule in which the subprogram is defined, or shall be declared in an ancestor of that program unit. C1242c (R1227) If MODULE appears within the in a module subprogram, the subprogram shall specify the same characteristics and dummy argument names as its corresponding ({ref to new 12.5.2.4}) module procedure interface body. C1242d (R1227) If MODULE appears within the in a module subprogram and a binding label is specified, it shall be the same as the binding label specified in the corresponding module procedure interface body. C1242e (R1227) If MODULE appears within the in a module subprogram, RECURSIVE shall appear if and only if RECURSIVE appears in the in the corresponding module procedure interface body.". 05-202r1: [282:35] 12.5.2.3 Instances of a subprogram, second paragraph, second sentence, replace "directly" with "by name". 05-202r1: [282:37] 12.5.2.3 Instances of a subprogram, second paragraph, append "If an internal procedure is invoked via a dummy procedure or procedure pointer, the internal procedure has access to the entities of the host instance of that dummy procedure or procedure pointer." TR 19767: [283:1-] Immediately before 12.5.2.4 ENTRY statement, insert new subclause "12.5.2.3a Separate module procedures A <> is a module procedure defined by a , by a whose initial statement contains the keyword MODULE, or by a whose initial statement contains the keyword MODULE. Its interface is declared by a module procedure interface body (12.3.2.1) in the of the module or submodule in which the procedure is defined, or in an ancestor module or submodule. R1234a <> MODULE PROCEDURE [ ] [ ] R1234b <> END [PROCEDURE []] C1251a (R1234a) The shall be the same as the name of a module procedure interface that is declared in the module or submodule in which the is defined, or is declared in an ancestor of that program unit and is accessible by host association from that ancestor. C1251b (R1234b) If a appears in the , it shall be identical to the in the MODULE PROCEDURE statement. A module procedure interface body and a subprogram that defines a separate module procedure <> if they have the same name, and the module procedure interface is declared in the same program unit as the subprogram or is declared in an ancestor of the program unit in which the procedure is defined and is accessible by host association from that ancestor. A module procedure interface body shall not correspond to more than one subprogram that defines a separate module procedure. Note 12.40a A separate module procedure can be accessed by use association if and only if its interface body is declared in the specification part of a module and is public. {end note} If a procedure is defined by a , its characteristics are specified by the corresponding module procedure interface body. If a separate module procedure is a function defined by a , the result variable name is determined by the FUNCTION statement in the module procedure interface body. Otherwise, the result variable name is determined by the FUNCTION statement in the module subprogram. TR 19767: [283:7] 12.5.2.4 ENTRY statement, second constraint (C1253), replace "" by "a that does not define a separate module procedure". TR 19767: [284:37] 12.5.2.6 CONTAINS statement, first paragraph, change first "module" to "module, submodule". 05-237r3: [287:7+] 12.6 Pure procedure, Note 12.44, first sentence, third line, replace "FORALL where" with "FORALL or a DO CONCURRENT construct, where" 05-237r3: [287:7+] 12.6 Pure procedure, Note 12.44, last sentence, replace "referenced in FORALL statements and constructs and within" with: "referenced in FORALL statements and constructs, DO CONCURRENT constructs, and within" 05-204r2: [294:25+] 13.5.2 Mathemetical functions, insert new line in list after ACOS: "ACOSH(X) Inverse hyperbolic cosine" 05-204r2: [294:26+] 13.5.2 Mathemetical functions, insert new line in list after ASIN: "ASINH(X) Inverse hyperbolic sine" 05-204r2: [294:27+] 13.5.2 Mathemetical functions, insert new line in list after ATAN: "ATANH(X) Inverse hyperbolic tangent" 05-240r4: [298:5+] 13.5.18 System environment procedures, insert new line in list: "EXECUTE_COMMAND_LINE execute a command line" 05-204r2: [301:10] 13.7.3 ACOS(X), Argument paragraph, after "1" insert ", or of type complex". 05-204r2: [301:13] 13.7.3 ACOS(X), Result Value paragraph, - delete ", expressed in radians". - change "It lies" to "If it is real it is expressed in radians and lies". - append to paragraph "If it is complex the real part is expressed in radians and lies in the range $0 \leq$ REAL(ACOS(X)) $\leq \pi$.". 05-204r2: [301:14+] Before 13.7.4 ADJUSTL(STRING) insert new section: "13.7.3a ACOSH (X) Description.Inverse hyperbolic cosine function. Class. Elemental function. Argument. X shall be of type real or complex. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the inverse hyperbolic cosine function of X. If the result is complex the imaginary part is expressed in radians and lies in the range $0 \leq$ AIMAG(ACOSH(X)) $\leq \pi$. Example. ACOSH(1.5430806) has the value 1.0 (approximately)." 05-204r2: [304:14] 13.7.12 ASIN(X), Argument paragraph, after "1" insert ", or of type complex". 05-204r2: [304:17] 13.7.12 ASIN(X), Result Value paragraph, - delete ", expressed in radians". - change "It lies" to "If it is real it is expressed in radians and lies". - append to paragraph "If it is complex the real part is expressed in radians and lies in the range $-\frac\pi2 \leq$ REAL(ASIN(X)) $\leq \frac\pi2$." 05-204r2: [304:18+] Before 13.7.13 ASSOCIATED insert new section: "13.7.12a ASINH (X) Description.Inverse hyperbolic sine function. Class. Elemental function. Argument. X shall be of type real or complex. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the inverse hyperbolic sine function of X. If the result is complex the imaginary part is expressed in radians and lies in the range $-\frac\pi2 \leq$ AIMAG(ASINH(X)) $\leq \frac\pi2$. Example. ASINH(1.1752012) has the value 1.0 (approximately). 05-204r2: [305:31] 13.7.14 ATAN(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [305:34] 13.7.14 ATAN(X), Result Value paragraph, - delete ", expressed in radians". - change "It lies" to "If it is real it is expressed in radians and lies". - append to paragraph "If it is complex the real part is expressed in radians and lies in the range $-\frac\pi2 \leq$ REAL(ATAN(X)) $\leq \frac\pi2$." 05-204r2: [305:35+] Before 13.7.15 ATAN2 insert new section: "13.7.14a ATANH (X) Description.Inverse hyperbolic tangent function. Class. Elemental function. Argument. X shall be of type real or complex. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the inverse hyperbolic sine function of X. If the result is complex the imaginary part is expressed in radians and lies in the range $-\frac\pi2 \leq$ AIMAG(ATANH(X)) $\leq \frac\pi2$. Example. ATANH(0.76159416) has the value 1.0 (approximately)." 05-204r2: [309:7] 13.7.24 COSH(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [309:9] 13.7.24 COSH(X), Result Value paragraph, append "If X is of type complex its imaginary part is regarded as a value in radians." 05-240r4: [315:24+] 13.7 Specification of the standard intrinsic procedures, before 13.7.36 EXP(X), insert new subclause "13.7.35a EXECUTE_COMMAND_LINE(COMMAND [, WAIT, EXITSTAT, CMDSTAT, CMDMSG ]) Description. Execute the command line specified by the string COMMAND. If the processor supports command line execution, it shall support synchronous and may support asynchronous execution of the command line. Class. Subroutine. Arguments. COMMAND shall be of type default character and shall be a scalar. It is an INTENT(IN) argument. Its value is the command line to be executed. The interpretation is processor-dependent. WAIT (optional) shall be of type default logical and shall be a scalar. It is an INTENT(IN) argument. If WAIT is present with the value false, and the processor supports asynchronous execution of the external command, the command is executed asynchronously; otherwise it is executed synchronously. EXITSTAT (optional) shall be of type default integer and shall be a scalar. It is an INTENT(INOUT) argument. If the command is executed synchronously, it is assigned the value of the processor-dependent exit status. Otherwise, the value of EXITSTAT is unchanged. CMDSTAT (optional) shall be of type default integer and shall be a scalar. It is an INTENT(OUT) argument. It is assigned the value -1 if the processor does not support command line execution, a processor-dependent positive value if an error condition occurs, or the value -2 if no error condition occurs but WAIT is present with the value false and the processor does not support asynchronous execution. Otherwise it is assigned the value 0. CMDMSG (optional) shall be of type default character and shall be a scalar. It is an INTENT(INOUT) argument. If an error condition occurs, it is assigned a processor-dependent explanatory message. Otherwise, it is unchanged. When the command is executed synchronously, EXECUTE_COMMAND_LINE returns after the command line has completed execution. Otherwise, EXECUTE_COMMAND_LINE returns without waiting. If an error occurs and CMDSTAT is not present, execution of the program is terminated." 05-199r2: [327:15-16] (LGE), [327:29-30] (LGT), [328:10-11] (LLE), [328:24-25] (LLT) Replace the argument descriptions of LGE, LGT, LLE and LLT with: "STRING_A shall be of type default character or type ASCII character. STRING_B shall be of type character with the same kind type parameter as STRING_A." 05-232r1: [350:12] 13.7.106 "SELECTED_REAL_KIND...", title, after "P, R" insert ", RADIX". 05-232r1: [350:13] 13.7.106, first paragraph "Description", - change "P digits and" to "P digits," - after "at least R" insert ", and a radix of RADIX". Making the whole description read "Returns a value of the kind type parameter of a real type with decimal precision of a least P digits, a decimal range of at least R, and a radix of RADIX." 05-232r1: [350:18+] 13.7.106, at the end of the "Arguments." paragraph, insert "RADIX (optional) shall be scalar and of type integer." 05-232r1: [350:21] 13.7.106, "Result Value" paragraph, after the first sentence "If ... value zero.", insert "If RADIX is absent, there is no requirement on the radix of the selected kind." 05-232r1: [350:21-29] 13.7.106, "Result Value" paragraph, replace the second sentence "The result has ... but not together." with the following two paragraphs, and make the remaining sentence ("If more ...") into a separate paragraph as well. "The result has a value equal to a value of the kind type parameter of a real type with decimal precision, as returned by the function PRECISION, of at least P digits, a decimal exponent range, as returned by the function RANGE, of at least R, and a radix, as returned by the function RADIX, of RADIX, if such a kind type parameter is available on the processor. Otherwise, the result is -1 if the processor supports a real type with radix RADIX and exponent range of at least R but not with precision of at least P, -2 if the processor supports a real type with radix RADIX and precision of at least P but not with exponent range of at least R, -3 if the processor supports a real type with radix RADIX but with neither precision of at least P nor exponent range of at least R, -4 if the processor supports a real type with radix RADIX and either precision of at least P or exponent range of at least R but not both together, and -5 if the processor supports no real type with radix RADIX." 05-204r2: [352:15] 13.7.111 SINH(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [352:17] 13.7.111 SINH(X), Result Value paragraph, append: "If X is of type complex its imaginary part is regarded as a value in radians." 05-234r2: [353:19] 13.7.144 SPREAD, "Arguments" paragraph, SOURCE argument, last sentence, change "less than 7" to "less than 15". 05-204r2: [355:16] 13.7.118 TAN(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [355:18-19] 13.7.118 TAN(X), Result Value paragraph - delete ", with X regarded as a value in radians" - append to paragraph "If X is of type real, it is regarded as a value in radians. If X is of type complex, its real part is regarded as a value in radians." 05-204r2: [355:24] 13.7.119 TANH(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [355:26] 13.7.119 TANH(X), Result Value paragraph, append: "If X is of type complex its imaginary part is regarded as a value in radians." 05-232r1: [378:4] 14.10.17 "IEEE_SELECTED_REAL_KIND...", title, after "P, R" insert ", RADIX". 05-232r1: [378:5-6] 14.10.17, "Description" paragraph, - change "P digits and" to "P digits," - after "at least R" insert ", and a radix of RADIX". Making the whole description read "Returns a value of the kind type parameter of an IEEE real type with decimal precision of a least P digits, a decimal range of at least R, and a radix of RADIX." 05-232r1: [378:11+] 14.10.17, at the end of the "Arguments." paragraph, insert "RADIX (optional) shall be scalar and of type integer." 05-232r1: [378:13] 14.10.17, "Result Value" paragraph, insert new first sentences "If P or R is absent, the result value is the same as if it were present with the value zero. If RADIX is absent, there is no requirement on the radix of the selected kind." 05-232r1: [378:13-17] 14.10.17, "Result Value" paragraph, replace the first sentence "The result ... neither is available." with "The result has a value equal to a value of the kind type parameter of an IEEE real type with decimal precision, as returned by the function PRECISION, of at least P digits, a decimal exponent range, as returned by the function RANGE, of at least R, and a radix, as returned by the function RADIX, of RADIX, if such a kind type parameter is available on the processor. Otherwise, the result is -1 if the processor supports a real type with radix RADIX and exponent range of at least R but not with precision of at least P, -2 if the processor supports a real type with radix RADIX and precision of at least P but not with exponent range of at least R, -3 if the processor supports a real type with radix RADIX but with neither precision of at least P nor exponent range of at least R, -4 if the processor supports a real type with radix RADIX and either precision of at least P or exponent range of at least R but not both together, and -5 if the processor supports no real type with radix RADIX." TR 19767: [403:38+] 15.4.1 Binding labels for procedures, after second paragraph, insert "C1506 A procedure defined in a submodule shall not have a binding label unless its interface is declared in the ancestor module. TR 19767: [405:12+] 16 "Scope, association, and definition", first numbered list, insert new item "(4a) A submodule idenfitifer({ref new 11.2.2}), TR 19767: [405:19] 16.1 Scope of global identifiers, first paragraph, second sentence, before the first "program unit" insert "non-submodule". TR 19767: [405:22] 16.1, first paragraph, after second sentence (ends "same program."), insert new sentence "The submodule identifier of a submodule is a global identifier and shall not be the same as the submodule identifier of any other submodule." TR 19767: [406:1-] 16.1, between Note 6.2 and the last paragraph insert "Note 16.2a Submodule identifiers are global identifiers, but since they consist of a module name and a descendant submodule name, the name of a submodule can be the same as the name of another submodule so long as they do not have the same ancestor module." TR 19767: [406:6] 16.2 Scope of local identifiers, first numbered list, item (1), after "abstract interfaces" insert ", module procedure interfaces". TR 19767: [406:20] 16.2, paragraph before Note 16.3, after "(4.5.9)", insert ", and a separate module procedure shall have the same name as its corresponding module procedure interface body". 05-237r3: [409:15-410:4] 16.3 Statement and construct entities, replace "FORALL construct" with "FORALL or DO CONCURRENT construct" in the following eight locations: 409:15 409:24 409:28 409:42 409:43 410:1 410:2 410:4 05-237r3: [409:26] 16.3 Statement and construct entities, 3rd paragraph, 2nd sentence, replace "includes the FORALL" with "includes the FORALL statement or FORALL or DO CONCURRENT construct". {NOTE FROM THE EDITOR: Ugh. No J3 action required.} TR 19767: [411:2] 16.4.1.3 Host association, first paragraph, first sentence, after "module subprogram" insert ", a module procedure interface body". TR 19767: [411:3] 16.4.1.3, first paragraph, second sentence, after "interface body", insert "that is not a module procedure interface body". TR 19767: [411:4] 16.4.1.3, first paragraph, after the second sentence, insert new sentence "A submodule has access to the named entities of its parent by host association." TR 19767: [411:7] 16.4.1.3, first paragraph, last sentence, after "abstract interfaces", insert ", module procedure interfaces". TR 19767: [411:34] 16.4.1.3, paragraph after the numbered list, second sentence, change "or a subprogram," to "or a subprogram that does not define a separate module procedure,". TR 19767: [412:1+2] 16.4.1.3, Note 16.9, after "An interface body" insert "that is not a module procedure interface body" (before "accesses by host association..."). 05-202r1: [415:7+] 16.4.2.1.3 "Events that cause the pointer association status of pointers to become undefined", numbered list, after item (4) insert a new (top level) item "(4a) Execution of the host instance of a procedure pointer is completed by execution of a RETURN or END statement." TR 19767: [415:15+] 16.4.2.1.3, after numbered list item (5)(d), insert new level 2 item "(d+) Is in the scoping unit of a submodule if any scoping unit in that submodule or any of its descendant submodules is in execution,". 05-210r2: [418:16-17] Replace the first sentence of the second paragraph of 16.4.5 Establishing associations -- the one that begins "For argument association..." -- by "For argument association, if the dummy argument is not a pointer and the corresponding actual argument is a pointer, the pre-existing entity is the target of that pointer. Otherwise the pre-existing entity is the corresponding actual argument. In either case, the associating entity is the dummy argument." 05-202r1: [418:18] Within the second paragraph of 16.4.5 Establishing associations, before the third sentence -- the one that begins "If the host scoping unit...: -- insert a new sentence: "If an internal procedure is invoked via a dummy procedure or procedure pointer, the pre-existing entity that participates in the association is the one from the host instance." Then replace "If" by "Otherwise if". TR 19767: [422:14-15] 16.5.6 Events that cause variables to become undefined, numbered list item (3)(c), - after "nonfinalizable local variables of a module" insert "or submodule"; - after "referencing the module" insert "or accessing the submodule". TR 19767: [422:16-17] 16.5.6, numbered list item (3)(d), - after "finalizable local variables of a module" insert "or submodule"; - after "referencing the module" insert "or accessing the submodule". 05-237r3: [423:18] 16.5.6 Events that cause variables to become undefined, item (15), replace "FORALL construct" with "FORALL or DO CONCURRENT construct". 05-237r3: [423:18+] 16.5.6, after item (15), add a new item "(15a) When a DO CONCURRENT construct terminates, a variable that is defined or becomes undefined during more than one iteration of the construct becomes undefined." 05-205r2: [426:8] Annex A, definition of <>, delete the first "DO". 05-200r1: [428:32-33] Annex A, definition of <>, change "component ... substring selectors" to "subobject selectors". TR 19767: [432:11+] Annex A, after <> definition, insert new definition "<> (12.3.2.1) : The interface for a separate module procedure." 05-200r1: [434:26-27] Annex A, definition of <>, numbered list item (1), replace the whole item "Part ... component" with "subobject". NOTE TO EDITOR: Replace with "A subobject". TR 19767: [435:20+] Annex A, after <> definition, insert new definition "<> ({new refs 2.2.5, 11.2.2}) : A program unit that extends a module or another submodule.". ===END OF DOCUMENT===