This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR20880 - Failure to detect procedures encompassing own interface


"Two or more accessible entities, other than generic interfaces or
defined operators, may have the same
identifier only if the identifier is not used to refer to an entity in
the scoping unit. Generic interfaces and
defined operators are handled as described in section 16.2.3. Except for
these cases, the local identifier
of any entity given accessibility by a USE statement shall differ from
the local identifiers of all other
entities accessible to the scoping unit through USE statements and
otherwise."

At the moment I fail to see whether this allows or forbids it.

The key is the "not used to refer to" in the first sentence. Clearly two modules can contain any amount of ambiguity and, indeed, must be able to do so, just as long as the ambiguous symbols are not referred to.

I believe that the test should include && sym->referenced.  I will
check this tonight and will commit under the obvious rule if it's OK.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]