Date: 2003 Mar 15 To: J3 From: Michael Ingrassia Subject: Edits In Response To Public Comment #20 point 15 Point 15 is >15. technical comment: The restrictions on generic declarations >given in Section 16.2.3 is complete for dummy arguments that >are objects, but not for dummy procedures. In particular, as >the standard is now written, if there are two dummy arguments >that have implicit interface, it can be impossible to decide >which specific function should be used for a given call. J3 responded that J3 did not agree that there was a problem. But I think J3 may change its mind if it sees an actual problem case. This is an attempt to exhibit such a problem and suggest a fix. interface h ! permitted as defined subroutine s2(f) external f end subroutine s2 subroutine s1(g) external g end subroutine s1 end interface h external x call h(x) ! call is ambiguous end The dummy arguments are dummy procedures with implicit interface. As such, they don't have types. Therefore f isn't type compatible with g or g with f. Therefore f isn't TKR compatible with g or vice versa. The dummy arguments have different names. Therefore the rules in 16.2.3 are satisfied for the pair of specific procedures s1, s2 and the interface block is valid Fortran code. The rules in 16.2.3 are intended to permit all calls to be disambiguated. But there's simply no way to disambiguate the call to h in the example. The problem is that the dummy arguments above should look "type compatible" for the rules to work right but dummy procedures don't necessarily have type (it is not a characteristic of dummy procedures). Fortunately a simple edit will make them TKR compatible. EDITS 74:7 Add the sentence, "Two procedures with implicit interface are TKR compatible with each other." --Michael I.