http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51268
--- Comment #8 from Sebastien Bardeau <bardeau at iram dot fr> 2011-11-24 15:58:31 UTC --- (In reply to comment #7) > (In reply to comment #6) > > > "Within a scoping unit, identifiers of entities in the following classes: > > (1) ..., abstract interfaces, generic interfaces, ... > > are local identifiers in that scoping unit. > > Within a scoping unit, a local identifier of an entity of class (1) shall > > not > > be the same as a global identifier used in that scoping unit." > > > > There is no explicit rule regarding the "specific interfaces" which we are > > interested in since the beginning. > > Well, there is: > "external procedures accessed via USE," > which should apply as "1.3.112.2 external procedure -- procedure defined [...] > by means other than Fortran (12.6.3)", namely (12.6.3): "The interface of a > procedure defined by means other than Fortran may be specified by an interface > body or procedure declaration statement." So I think at this stage we disagree on the standard interpretation. External procedures are just external procedures declared with the EXTERNAL statement. If their interface is provided thanks to a specific interface, then the rules regarding the specific interfaces must apply, if such rules exist. Furthermore in our case we are discussing Fortran-based subroutines and their interfaces, so there are no "external procedures defined by other means than Fortran" to be considered here. > > "A procedure shall not have more than one explicit specific interface in a > > given scoping unit, except that if the interface is accessed by use > > association, there may be more than one local name for the procedure". > > As far as I understand, specific interface names accessed by use-association > > do not conflict with the procedure name itself. Isn't it a key point in our > > discussion? > > Well, it is the key point of the discussion. However, the quote is about: > USE m, func1 => f, func2 => f > where func1 and func2 both are different local names for the same procedure > and > where the USE statement does not make "f" a class-1 identifier. And there is > also: > use m1, only: f > use m2, only: f > which is OK if "m2" use-associates "f" from m1 (or vice versa). Well, by reading again and again the corrigendum added here, I would have said that it corrects on purpose the problem we are facing. We must not be the only ones trying to write and share among files the specific interfaces to Fortran77-based procedures...