https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80554
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2017-05-01
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I think GFortran should also accept the code. As far as I know, entities
> from the ancestor module are host associated, and we should be allowed
> to specify a local entity in the submodule with the same name.
> Or is there any restriction in the standard which forbids it?
How do you parse
> 16.3 Local identifiers
> 16.3.1 Classes of local identifiers
> 1 Identifiers of entities in the classes
> (1) except for statement or construct entities (16.4), named variables,
> named constants, named constructs, statement functions, internal
> procedures, module procedures, dummy procedures, intrinsic procedures,
> external procedures that have binding labels, intrinsic modules,
> abstract interfaces, generic interfaces, derived types, namelist groups,
> external procedures accessed via USE, and statement labels,
> (2) type parameters, components, and type-bound procedure bindings,
> in a separate class for each type,
> (3) argument keywords, in a separate class for each procedure with an
> explicit interface, and
> (4) common blocks that have binding labels
> are local identifiers.
> 2 Within its scope, a local identifier of an entity of class (1) or class (4)
> shall not be the same as a global identifier used in that scope unless
> the global identifier
> • is used only as the use-name of a rename in a USE statement,
> • is a common block name (16.3.2),
> • is an external procedure name that is also a generic name, or
> • is an external function name and the inclusive scope is its defining
> subprogram (16.3.3).
?
Why do you want to use such constructs? IMO, if they are not forbidden, using
them is asking for trouble.