J3/17-162 To: J3 From: John Reid & Malcolm Cohen Subject: EXTERNAL specifier on IMPLICT NONE Date: 2017 June 07 Discussion: ----------- In 8.7 IMPLICIT statement, C893 says "If IMPLICIT NONE with an implicit-none-spec of EXTERNAL appears within a scoping unit, the name of an external or dummy procedure in that scoping unit or in a contained subprogram or BLOCK construct shall be explicitly declared to have the EXTERNAL attribute." This does not quite work. Consider the program ! An external subprogram (not internal or module): RECURSIVE SUBROUTINE sub() IMPLICIT NONE(EXTERNAL) ENTRY esub() ... END SUBROUTINE The above subprogram defines two external procedures, SUB and ESUB. So, within the subprogram, SUB and ESUB are the names of external procedures. However, SUB and ESUB do NOT have the EXTERNAL attribute within the subprogram, and the user is forbidden to give them the EXTERNAL attribute (C840). So SUB and ESUB violate C893, because each one is "the name of an external or dummy procedure in that scoping unit" and cannot "be explicitly declared to have the EXTERNAL attribute". An edit is supplied to correct this. Edit to 17-007r1: ------------------ [120:26] In 8.7 IMPLICIT statement, C893, after "construct shall" add "have an explicit interface or".