Names in EQUIVALENCE statements are only allowed to indicate local
objects as per 19.5.1.4, paragraph 2, item (10). Thus, a name appearing
in an EQUIVALENCE statement with no corresponding declaration in the
same scope is an implicit declaration of the name. If that scope
contains an IMPLICIT NONE, it's an error.
I implemented this by adding a state variable to the SemanticsContext to
indicate if we're resolving the names in an EQUIVALENCE statement and
then checked this state when resolving names. I also added a test to
the existing tests for EQUIVALENCE statements.
This is really just a convenience wrapper for find(), yes? If so, then either it's redundant with find(), or you should find and replace other uses of find() with your new API and avoid the confusion that can arise with multiple interfaces that do much the same thing. (Preference is for the former, since usage of find() in scopes is pretty idiomatic by this point.)