To: J3                                                     J3/26-190
From: Malcolm Cohen
Subject: Editor's report for 26-007r2 (N2258)
Date: 2026-June-26

1. Introduction

This is the editor's report for the CD submission document, N2258,
also known as 26-007r2.

There is a new uppercase keyword, UNRESOLVED, for issues that would previously
have resulted in a UTI. As this is the CD submission document, UTIs are not
acceptable, so they are here instead.

2. Results

26-153r1.

[405:1]
DIFF LOCATION actually line 4.

Done

26-143.

Done.

26-154r1.

Done.

26-155r1.

Done.

26-145r1.

Done.

26-148.

Done.

26-135.

DIFF Reworded whole para to put "interpreted as if an Ln" ahead of the
     restrictions on what characters are permitted.
[337:33]

Done.

26-136.

Done.

26-160r1.

DIFF inserted new text before "data" instead of after.
[325:16,17]

Done.

24-124. NOTE: This paper is from two years ago, before we started editing.

Done.

26-174.

DIFF also inserted missing Oxford comma in the list.
[197:9]

26-172.

Done.

26-173.

DIFF named constant in front of the name, combined into a single footnote.
[604:14-15] Add footnotes to C_FLOAT_COMPLEX, C_DOUBLE_COMPLEX, and

DIFF similarly
[613:table 19.2] Modify the first three rows of the COMPLEX section of

DIFF reworded
[667:32] Add a new item to the list of obsolescent features:

DIFF reworded to be more polite.
[670:4] Add a new subclause and paragraph:

Done.

26-167.

COMMENT: The paper notes "the second insertion above is technically redundant
         with constraint C956 for R930" and "for consistency reasons, the
         redundant wording should either appear in all four analogous
         constraints (C1706, C1710, C1714, C1718), or in none of them".
         The editor concurs, and thinks that removing the redundant wording
         would probably be a tiny improvement. But he declines to remove it
         right now: if HPC agree that it would be a small improvement, it can
         be proposed as an editorial change in between CD and DIS.

Done.

26-158.

DIFF did not delete the BNF continuation nor the rest of that BNF rule.
[399:26] (16.2 Templated subprograms) Replace parens with curly braces

Done.

26-166.

Done.

26-165.

DIFF added as 3.134.3 as executable/nonexecutable go together.
     Rewrote Note 1 to be grammatical and informative.
[26:37+] Add "3.134.1+ matching statement" with the following

EXTRA: Missing edit
[172:9] 9.8.1.2 Execution of an ALLOCATE statement, p5,
        "same ALLOCATE statement" -> "matching ALLOCATE statement".

COMMENT: Some edits here fail to say which subclause.
         I need this when I check that the edit was correctly applied!

DIFF "the same CHANGE TEAM statement" -> "the matching CHANGE TEAM statement".
[221:31-32] 11.1.5.2 Execution of a CHANGE TEAM construct, p5,

Done.

26-139.

DIFF Reworded to be grammatical.
COMMENT Another paper missing the required subclause and paragraph location.
DIFF Completely rewrote as it was not quite right. It should have said
    "TEMPLATE construct" and "templated subprogram" (which can be hyperlinked)
     as it is talking about the syntax not the conceptual entity.
EXTRA changed some other occurrences of "template" to "TEMPLATE construct"
      and some other "templated procedure" to "templated subprogram",
      and indexed/hyperlinked some of these.
[400:7] 16.3 Restrictions on template definitions,

Done.

26-140.

COMMENT did as is, but why does the template not have an explanatory name
        like "type_naming_template"?
[401:1-] (16.3 Restriction on template definitions). Replace existing

DIFF Reworded witter because this is The INSTANTIATE statement, so an example
     with multiple deferred arguments is not relevant EXCEPT for how it is
     instantiated.
     "multiple deferred arguments" -> "more than one deferred argument".
     inserted vertical ellipsis where there must be some more code
     (at a minimum, a CONTAINS statement would be required).
     Removed excessive blank lines.
[406:15+] 16.5.1 The INSTANTIATE statement, end of, insert new note:

DIFF "makes use of procedures" -> "uses the procedures".
     Unquoted the procedures as they are not character strings; we could use
     uppercase for clarification as Fortran is not case-sensitive, but in
     this case I think we are fine.
     "yields" -> "assigns the value", "102" -> "102.0".
     (I inserted the note, I did not just introduce it.)
[406:21+] 16.5.2 The Inline instantiation of templated procedures,

COMMENT Note numbering is not manual.
[406:21+] (16.5.2 The Inline instantiation of templated procedures)

Done.

26-159r2 combined with 26-179.

DIFF inserted as second sentence    , not appended.
[459:3-4] 17.9.58 CO_REDUCE_PREFIX_EXCLUSIVE

Done.

26-132.

DIFF "result is as if CONTEXT was" -> "result value is as if CONTEXT were".
[559:21+]

Done.

26-133.

Done.

26-134r1.

Done.

26-177.

Done.

26-178r1.

Done.

26-149.

Done.

26-146r1.

Done.

26-147r2.

Done.

26-152r1.

Done.

26-156r1.

Done.

26-161.

DIFF added after procedure-name, not before.
[409:8+] Add inline-instantiation to R1631, so that it now reads

DIFF did not unhyphenate or unitalicise procedure-name, inserted
     after procedure-name, not before
[411:8-9] change " or procedure-name" to ", inline-instantiation,

Done.

26-142.

Done.

26-170r1.

Done.

26-171r1.

Done.

26-163r1.

Done.

26-157r1.

Edits:

DIFF "DEFAULT KIND statements".
     Hyperlinked/indexed this, also most of the other statements in the table.
[50:9+] Table 5.1 -- Requirements on Statement Ordering

Done.

26-180.

Done.

26-141r1.

Done.

26-181.

Done.

26-182.

Done.

26-184r1.

COMMENT: In future, all edit papers must be text not PDF, unless by explicit
         permission from the editor. I don't think I lost anything in the PDF
         to text translation, but it was certainly extra unnecessary work.

DIFF Wrong place. This needs to precede named program units.
     Also does not handle nested TEMPLATE. Added "the scoping unit of".
[559:12+] Still within the set of cases where CONTEXT is absent or false,
          add a new Case between Case(iii) (MAIN program) and Case(iv)
          (BLOCK DATA) and renumber appropriately.

COMMENT We really don't need to say "including any subprograms internal to a
        template subprogram or a generic subprogram" as they *ARE* internal
        subprograms by definition! Left as is.
DIFF We can't say "in the rest of the paragraph, as there are no clear
     paragraph delimiters; said "the cases below" instead.
     Made it a semicolon list;
     "The remaining characters" -> "all other characters".
[559:15-21] Convert the paragraph on these lines to two sentences with a list

COMMENT It looks like re-wordsmithing this whole list from first principles,
        once we have a clear look at it, would be a good idea.
COMMENT "but not within" reads better I think. Not changed.
[559:25] Case(ii) (reference in module/submodule) add the phrase "and is not
         within a TEMPLATE construct," after "module or submodule" so the...

DIFF no, this is not what we intend. We do not intend the quotes to be in the
     output. Reworded.
[559:29] Replace this line with:

DIFF "or in a" -> "or".
[559:31+] Within the set of cases, after Case(iv) (external subprogram) and
          before Case(v) (BLOCK DATA) insert the following case:

DIFF Reworded.
[559:34] Replace this line with:

DIFF Used lowercase for procedure_name consistently, just like before.
[560:Examples]

DIFF Multiple errors in the example, e.g. template constructs are not
     subprograms and cannot appear in the subprogram-part, and TEMPLATE
     constructs can appear only in the specification part of a main program,
     module, or another TEMPLATE construct. NOT in a subprogram or submodule.
     Rewrote the example to fix its defects, in particular, deleting all the
     clearly invalid bits.
     Inserted missing "USE ISO_FORTRAN_ENV".
     More rewriting of existing bits to avoid overlong lines.
[560:28-] Add a TEMPLATE construct with another, nested TEMPLATE construct to

Done.

26-183r1.

Done.

26-144r3.

DIFF "Within a template" -> "Within a TEMPLATE construct" as this is syntax.
     Note: "instantiation of the template"[defined by the construct] is fine.
[407:] Insert new constraint C1624a, "Within a template, an entity

DIFF Actually, it is invalid because it is contradictory nonsense, whether the
     constraint exists or not (and independent of the conformity subclause).
     Reworded the introductory sentence as
     "The following invalid source code is expressly forbidden by Cnnnn."
[407:] Insert the following as a note.

DIFF I note that the source code violates the constraint, but the dependence
     is looks harmless - S1 depends on T, but T does not depend on S1, so the
     circularity of the dependence looks like it is resolvable.
     Reworded similarly to first note, omitting "invalid".
     Moved both notes to the end, so the second constraint is not hidden
     between two notes.
     Renamed the template as "tmpl" is not only ugly but duplicative.
COMMENT I wonder if some more explanation of why this should be invalid,
        despite the dependency being apparently resolvable, would be useful.
        E.g. something like
   "Note that if this were to be allowed, instantiation with an instantiation
    argument other than the procedure S1 in the module would create a different
    type T, but the instantiation argument would still need have to have a
    dummy argument of the original type T from the module. This would be very
    confusing." ? (I did not insert that.)

DIFF "template" -> "TEMPLATE construct" (these are all syntactic entities).
PROBLEM This makes host association say that is works in a template as
        specified in 8.9.
        BUT 8.9 DOES NOT SPECIFY HOST ASSOCIATION FOR TEMPLATES.
[643:24] before "submodule" delete "or " and after "submodule" insert

EXTRA (to fix the above problem).
[150:10-11] 8.9 IMPORT statement, p4 "If an IMPORT statement with no...",
    before "internal subprogram"
    insert "interface body in a deferred interface block"
    (this list is in alphabetic order: move the last item to the right place),
    change "or an interface body in a deferred interface block"
    to "or a TEMPLATE construct".

Done.

26-150r3.

DIFF Initial "The" -> "A" (no antecedent yet).
     "the instantiation argument" -> "that instantiation argument".
     Deleted the colon (colon works for a semicolon-list, but this is
     a comma-list).
UNRESOLVED: This description will apply an extra defined assignment call
    if there is defined assignment for the type of a function.
    Also, it will apply an extra copy plus a call to a final subroutine,
    should one be applicable.
    That is not quite the same as replacing the deferred procedure calls with
    a call to the instantiation argument itself, nor is it the same as the
    previous technical spec.
    Perhaps the assignment should be "as if there were no defined assignment
    applicable for the type, and no applicable final subroutine"?
    Not quite convinced we have nailed this down securely enough.
    More work is clearly needed.
    Did not insert a UTI because this is the CD submission.
    It warrants one, though.
[412:1-413:1] Replace the paragraph with the following.

NOTE: The NOTE is not (yet) actually true, until the UTI is resolved.
[413:1+] Insert the following as a NOTE.

DIFF Deleted "then" and "effective".
[413:7+] Introduce a new constraint, "If a deferred procedure is elemental,

DIFF Did not hyphenate nonoptional.
[413:7+] Introduce a new constraint, "An optional argument of a

COMMENT We have two notes with examples. Do we really need both?
        Are they in the right order? The right place?
DIFF Deleted the colon. Inserted Oxford comma.
     Renamed the procedure on the instantiate otherwise the example
     program fragment is not conforming (two "DOIT"s).
[413:10+] Insert the following as a NOTE.

Done.

26-151r2.

DIFF Deleted colon.
     Other minor rewording.
     "deferred argument" -> "deferred constant" twice.
     A template is IMPLICIT NONE, but you used implied-do variable I without
     any declaration: inserted declaration.
     Shortened example comments to avoid overlong lines.
UNRESOLVED: Third bullet is entirely redundant, because if an entity's rank
         depends on
         - the rank of an implied-rank entity, it ipso factor depends on the
           value of a deferred constant,
         - the rank of a deferred constant other than implied-rank, it ipso
           facto depends on the value of a deferred constant (the shape of a
           value is part of the value).
         So a deferred-rank entity is thus simply an implied-rank entity or an
         entity whose rank depends on the value [or shape or size or rank] of
         a deferred constant.
NOTE I did not make this change.
UNRESOLVED "syntactically equivalent" is undefined.
           Did you mean "identical"? (without adverb "syntactically").
[130:1-7+] Replace the entirety of subclause 8.5.8.8 with the following.

UNRESOLVED This too uses the insufficiently-thought-out term "syntactically
           equivalent".
           On further reflection, the situation is worse than I thought.
           Never mind the idea that "named constant + literal" is the syntax
           and thus "N+1" could be considered the same as "N+2". What about
           "N+M" where in different contexts, N and N are not the same entity.
           Also, in two different instantiations of the same template, the
           expression "N" is not the same but is syntactically the same.
           "identical" (***NOT*** "syntactically identical") seems to work.
NOTE Indexed "deferred-kind type parameter" as a definition.
UNRESOLVED We went out of our way to say that RANK(x) could be used to declare
           another deferred-rank entity with the "same rank" as X, but we did
           not do that for KIND(x) and deferred-kind entities.
           This is inconsistent.
           Also consider permitting "x%kind" for that...
           ...especially considering that "x%kindtypeparameter" works for
           derived types with multiple kind type parameters.
[404:7+] Insert the following paragraph

DIFF Changed to "Implied rank".
     Fixed spacing to accord with our style (space before left parenthesis).
[404:7+] In NOTE 2, change "assumed-or-implied-rank-spec" to just

Done.

26-176r2.

Done.

26-186.

Done.

26-187r2.

Done.

26-188.

Done.

Final adjustments.

Changed footer date to today.
Reworded second example in REDUCE_PREFIX_INCLUSIVE to avoid overlong line.
