http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48858

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-07 
22:14:15 UTC ---
See also discussion starting at
  http://j3-fortran.org/pipermail/j3/2008-December/002123.html

Fortran 2003 has in "16.1 Scope of global identifiers"

"Program units, common blocks, external procedures, and entities with binding
labels are global entities of a program. The name of a program unit, common
block, or external procedure is a global identifier and shall not be the same
as the name of any other such global entity in the same program, except that an
intrinsic module may have the same name as another program unit, common block,
or external procedure in the same program. A binding label of an entity of the
program is a global identifier and shall not be the same as the binding label
of any other entity of the program; nor shall it be the same as the name of any
other global entity of the program that is not an intrinsic module, ignoring
differences in case. An entity of the program shall not be identified by more
than one binding label."

Fortran 2008 has in "16.2 Global identifiers" - the "{>>}"/"{<<}" was added by
me for emphasis.

"Program units, common blocks, external procedures, entities with binding
labels, external input/output units, pending data transfer operations, and
images are global entities of a program. The name of a common block with no
binding label, external procedure {>>}with no binding label{<<}, or program
unit that is not a submodule is a global identifier. The submodule identifier
of a submodule is a global identifier. A binding label of an entity of the
program is a global identifier. An entity of the program shall not be
identified by more than one binding label.

The global identifier of an entity shall not be the same as the global
identifier of any other entity. Furthermore, a binding label shall not be the
same as the global identifier of any other global entity, ignoring differences
in case."


See also: http://www.j3-fortran.org/doc/year/08/08-295.txt ; we might need to
handle also "COMMON /foo/" where "foo" is also no global identifier any more.
(I don't know whether one needs to handle it somewhere.)

Cf. also
http://j3-fortran.org/doc/year/08/08-196.txt
http://j3-fortran.org/doc/year/08/08-187.txt
F03/0076 at http://j3-fortran.org/doc/year/08/08-006Ar4.txt

Reply via email to