To: J3 J3/26-151r2 From: Brad Richardson & Generics Subject: Response to UTIs 028 and 029 Date: 2026-June-17 Reference: 26-007r1 UTI 028 states: "deferred kind/rank incomplete You specify that these depend "on the value of a deferred argument" (making it a deferred constant), but the example (which nonsensically calls everything implied-rank when deferred-rank is sometimes intended) has things depending on stuff other than the value, e.g. the size of a deferred constant. Did not fix." UTI 029 states: "Example says B is implied-rank but it is not. Nor does B satisfy the definition of deferred rank. I would guess that B is intended to be deferred rank. X, Y, and Z are called implied-rank but they are not, but they do satisfy the definition of deferred rank. Not fixing until this is clarified." The distinction between implied-rank and deferred-rank is not really necessary, and we should just unify the two and make it coherent. The following edits accomplish this. [130:1-7+] Replace the entirety of subclause 8.5.8.8 with the following. "8.5.8.8 Deferred and implied-rank entities An implied-rank entity is a deferred constant declared with an implied-rank-spec. A deferred-rank entity is: * an implied-rank entity, * an entity whose rank depends on the value or size of a deferred constant, or * an entity whose rank depends on the rank of a deferred-rank entity. R829 implied-rank-spec is .. An entity with deferred rank has the same rank as another entity if and only if * both entities are declared by the same RANK clause (8.5.17), * the entities are both declared by a RANK clause that contains a single scalar-int-constant-expr, and the expressions are syntactically equivalent, * both entities are declared with an array-spec, and the array-specs are syntactically equivalent, or * one entity is declared by a RANK clause with a single expression that is a reference to the intrinsic function RANK with the other entity as its argument. NOTE 1 In the following example, the deferred constant acorn has implied rank. The public named constant cone, and the dummy argument x have deferred rank. In a specific instantiation of the template, these entities will have a specific rank. TEMPLATE example {acorn, s} DEFERRED INTEGER, PARAMETER :: acorn (..) DEFERRED INTEGER, PARAMETER :: s (*) REAL, PUBLIC, PARAMETER :: cone (s) = 1.0 CONTAINS SUBROUTINE sub (x) REAL, RANK(RANK(acorn)) :: x x = acorn END SUBROUTINE END TEMPLATE NOTE 2 Some examples of deferred-rank entities are shown in the following example template. C is declared to have implied-rank. B has deferred-rank because its rank depends on the size of the deferred argument S. X, Y and Z are deferred-rank because their ranks depend on the value of the deferred argument N. TEMPLATE EXAMPLE{C, S, N} DEFERRED INTEGER, PARAMETER :: C(..) ! implied-rank DEFERRED INTEGER, PARAMETER :: S(*), N INTEGER, PARAMETER :: B(S) = 1 ! explicit-shape & deferred-rank CONTAINS SUBROUTINE SUB(X) INTEGER, RANK(N) :: X ! assumed-shape & deferred-rank INTEGER :: Y([(i, i = 1, N)]) ! explicit-shape & deferred-rank INTEGER, RANK(N), ALLOCATABLE :: Z ! deferred-shape & deferred-rank call sub_explicit(C) ! valid, sequence association ! call sub_assumed(C) ! invalid, rank expressions don't match ! call sub_same_rank(C) ! invalid, rank expressions don't match call sub_explicit(X) ! valid, sequence association ! call sub_assumed(X) ! invalid, rank expressions don't match call sub_same_rank(X) ! valid, rank expressions match call sub_explicit(Y) ! valid, sequence association ! call sub_assumed(Y) ! invalid, rank expressions don't match ! call sub_same_rank(Y) ! invalid, rank expressions don't match END SUBROUTINE SUBROUTINE SUB_EXPLICIT(X) INTEGER :: X(10) END SUBROUTINE SUBROUTINE SUB_ASSUMED(X) INTEGER :: X(:) END SUBROUTINE SUBROUTINE SUB_SAME_RANK(X) INTEGER, RANK(N) :: X END SUBROUTINE END TEMPLATE" [357:11+] Delete UTI 28. [357:12-25] Delete these paragraphs and the note. [358:1-] Delete UTI 29. [358:6-] Delete the NOTE [404:7+] Insert the following paragraph "A kind type parameter that depends on the value of a deferred constant is a deferred-kind type parameter. A kind type parameter that depends on a deferred attribute of another entity is also a deferred-kind type parameter. A deferred-kind type parameter of an entity has the same value as the corresponding type parameter of another entity if and only if both kind type parameters are declared with syntactically equivalent expressions." [404:7+] In NOTE 2, change "assumed-or-implied-rank-spec" to just "implied-rank-spec" [404:8-] Insert the following note "NOTE 3 Examples of deferred-kind type parameters. TEMPLATE EXAMPLE{K1, K2} DEFERRED INTEGER, PARAMETER :: K1, K2 INTEGER PARAMETER :: K3 = K1 + 1 CONTAINS SUBROUTINE SUB() INTEGER(K1) :: I INTEGER(K2) :: J INTEGER(K3) :: K INTEGER(KIND(K)) :: L INTEGER(K1+1) :: M INTEGER(1+K1) :: N CALL SUB_K1(I) ! Valid, same kind ! CALL SUB_K2(I) ! Invalid, different kinds ! CALL SUB_K1(J) ! Invalid, different kinds CALL SUB_K2(J) ! Valid, same kind CALL SUB_K3(K) ! Valid, equivalent expressions ! CALL SUB_K3(L) ! Invalid, different expressions ! CALL SUB_K3(M) ! Invalid, different expressions ! CALL SUB_K3(N) ! Invalid, different expressions ! CALL SUB_K1P1(K) ! Invalid, different expressions ! CALL SUB_K1P1(L) ! Invalid, different expressions CALL SUB_K1P1(M) ! Valid, equivalent expressions ! CALL SUB_K1P1(N) ! Invalid, different expressions END SUBROUTINE SUBROUTINE SUB_K1(A) INTEGER(K1) :: A END SUBROUTINE SUBROUTINE SUB_K2(B) INTEGER(K2) :: B END SUBROUTINE SUBROUTINE SUB_K3(C) INTEGER(K3) :: C END SUBROUTINE SUBROUTINE SUB_K1P1(D) INTEGER(K1+1) :: D END SUBROUTINE END TEMPLATE" --END--