J3/16-221 To: J3 From: Malcolm Cohen Subject: Integration issue with assumed-rank Date: 2016 June 06 1. Introduction In "normal" generic resolution, assumed-rank acts as if it were an explicit specification of all possible ranks; that is, it is not distinguishable from any rank of dummy argument. Thus, for example, INTERFACE gen SUBROUTINE sub(x) REAL x(..) END SUBROUTINE END INTERFACE This prohibits any other specific in GEN from having just a single argument that is default REAL, no matter what rank. However, for FINAL subroutines, the generic requirements are specified in C487, which has not been updated to account for assumed rank. This currently says: C487 (R453) A final subroutine shall not have a dummy argument with the same kind type parameters and rank as the dummy argument of another final subroutine of that type. 2. Technical Solutions Various solutions are possible: (1) Follow the same rule as normal generics, i.e. assumed-rank prohibits all other ranks. (2) Prohibit assumed-rank as being too dangerous and inconvenient. 3. Edits to 16-007r1 for (1) [77:18+] 4.5.6.1 FINAL statement, after C487 (before p1 "The FINAL...") insert new constraint "C487a (R453) If a final subroutine has an assumed-rank dummy argument, no other final subroutine of that type shall have a dummy argument with the same kind type parameters." [78:6] 4.5.6.2 The finalization process, p1, item (1) after "elemental final subroutine whose dummy argument has the same kind type parameters as the entity being finalized" insert ", or a final subroutine with an assumed-rank dummy argument with the same kind type parameters as the entity being finalized," 4. Edits to 16-007r1 for (2) [77:18+] Same place, but insert "C487a (R453) A final subroutine shall not have an assumed-rank dummy argument." ===END===