J3/99-230 Date: 11th October 1999 To: J3 From: Malcolm Cohen Subject: Interpretation request on host association NUMBER: TITLE: Host association and the EXTERNAL attribute KEYWORDS: Host association, EXTERNAL DEFECT TYPE: STATUS: QUESTION: Use of a (non-intrinsic) name as a procedure in a procedure reference implicitly confers the EXTERNAL attribute on the name. Does this happen when the name is host-associated? For example, interp 143 established that MODULE m REAL x CONTAINS SUBROUTINE s PRINT *,x(1) END SUBROUTINE END was invalid - 11.3.2 now says that a "procedure with implicit interface and public accessibility shall explicitly be given the EXTERNAL attribute in the scoping unit of the module". However, this text says nothing about private entities, so considering: MODULE m2 REAL,PRIVATE :: x CONTAINS SUBROUTINE s PRINT *,x(1) END SUBROUTINE END This example does not violate 11.3.2 because X is PRIVATE. Is this example conforming? Further, considering: PROGRAM m3 REAL x CONTAINS SUBROUTINE s PRINT *,x(1) END SUBROUTINE END This example is not of a module and so 11.3.2 does not apply. Is this example conforming? ANSWER: No, use of a host-associated name never confers attributes on the host entity. Examples M2 and M3 are therefore invalid. Edits are supplied. {Alternative answer 1: Yes, use of a host-associated name confers attributes on the host entity except when the host entity is a PUBLIC entity of a module. No edits.} {Alternative answer 2: Yes, use of a host-associated name always confers attributes on the host entity. All 3 examples are therefore valid. Edits are supplied to make example 1 valid.} COMMENT to J3: Observed behaviour of existing implementations includes: (1) all examples accepted (2) M1 rejected, M2 and M3 accepted (3) M1 and M2 rejected, M3 accepted (4) all examples rejected. [All 4 forms of behaviour are conforming if the examples are not conforming...] EDIT: [188:28] Delete "and public accessibility". [188:31] Delete "with public accessibility". [283:16+] Add new paragraph "A procedure with an implicit interface that is accessed via host association shall be referenced as a procedure in the host scoping unit or be used as a procedure in that scoping unit. An intrinsic procedure that is accessed via host association shall explicitly be given the INTRINSIC attribute in the host scoping unit or be used as an intrinsic procedure in that scoping unit." {Alternative answer 2: ... edits required...} SUBMITTED BY: Malcolm Cohen HISTORY: 99-230 m151 submitted