This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45271] [OOP] Polymorphic code breaks when changing order of USE statements
- From: "mikael at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2010 14:25:07 -0000
- Subject: [Bug fortran/45271] [OOP] Polymorphic code breaks when changing order of USE statements
- References: <bug-45271-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from mikael at gcc dot gnu dot org 2010-08-13 14:25 -------
There is code to prevent duplicate names to be imported, but it is bypassed by
vtab and vtype stuff:
in module.c line 4373:
/* Exception: Always import vtabs & vtypes. */
if (p == NULL && (strcmp (xstrndup (name,5), "vtab$") == 0
|| strcmp (xstrndup (name,6), "vtype$") == 0))
p = name;
/* Skip symtree nodes not in an ONLY clause, unless there
is an existing symtree loaded from another USE statement. */
if (p == NULL)
{
st = gfc_find_symtree (gfc_current_ns->sym_root, name);
if (st != NULL)
info->u.rsym.symtree = st;
continue;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45271