This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16479] COMMON block names are not private
- From: "olchansk at panix dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2004 21:49:20 -0000
- Subject: [Bug fortran/16479] COMMON block names are not private
- References: <20040711212319.16479.olchansk@panix.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From olchansk at panix dot com 2004-07-11 21:49 -------
This appears to fix the incorrect exporting of common block names. Tested:
common block name is written into the .mod file if "private" is absent.
[olchansk@send fortran]$ cvs diff -u module.c
Index: module.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fortran/module.c,v
retrieving revision 1.10
diff -u -r1.10 module.c
--- module.c 9 Jul 2004 22:27:15 -0000 1.10
+++ module.c 11 Jul 2004 21:46:55 -0000
@@ -3171,6 +3171,9 @@
write_common(st->left);
write_common(st->right);
+ if (!check_access (st->n.common->head->attr.access,
st->n.common->head->ns->default_access))
+ return;
+
mio_lparen();
mio_internal_string(st->name);
K.O.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16479