------- 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