This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran, committed] Fix segfault in PR16336
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 10 July 2004 19:15, Tobias Schlüter wrote:
> Erik Schnetter wrote:
> > On Saturday 10 July 2004 18:30, Tobias Schlüter wrote:
> >>I'm inclined to believe that the code in PR 16336 is indeed
> >> invalid, but I will double check the standard to make sure that
> >> this is true.
> >
> > The stripped-down example is indeed invalid. The original source
> > code declared the common block in the module as private, so that
> > there should be no name clash.
>
> Hmm, re-reading the standard. I'm less sure that my argument is
> correct. I'll look further, unless you can prove me from te standard,
> that the code is indeed valid :-)
Hmm. I just reopened the PR. We shouldn't discuss this on both
bugzilla and this list -- I'll refrain from adding to the PR until this
has been sorted out on this list. I added the following comment:
Section 11.2.1, "The USE statement and use association" of the draft of
the Fortran 2003 standard (J3/04-007) says
"The USE statement provides the means by which a scoping unit accesses
[...]"
and then gives a list of what is accessed. This list does not include
common block names (except if common blocks are "named data objects",
which I do not think). That means that a module should never export
common block names.
The standard speaks later in the same section of "accessible entities".
If common blocks are not entities, then they should not become
accessible.
- -erik
- --
Erik Schnetter <schnetter@aei.mpg.de> http://www.aei.mpg.de/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA8Cb5m3uiSwno3f0RArANAJwNQesk523JS7aLtap1INCw2x825ACgv2c2
U9cezLI2ps4NbvDWkbA8GL0=
=oEyh
-----END PGP SIGNATURE-----