This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53111] [4.7/4.8 Regression] Derived types cannot be USE-associated again with -std=f95
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 May 2012 06:08:20 +0000
- Subject: [Bug fortran/53111] [4.7/4.8 Regression] Derived types cannot be USE-associated again with -std=f95
- Auto-submitted: auto-generated
- References: <bug-53111-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53111
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-02 06:08:20 UTC ---
Something like the following should work; it might require some refinement or
can be shorted. (Completely untested.)
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -12015,6 +12046,10 @@ resolve_fl_derived (gfc_symbol *sym)
if (!sym->attr.is_class)
gfc_find_symbol (sym->name, sym->ns, 0, &gen_dt);
if (gen_dt && gen_dt->generic && gen_dt->generic->next
+ && (gen_dt->generic->next->next
+ || !gen_dt->generic->sym->attr.use_assoc
+ || gen_dt->generic->sym->module
+ != gen_dt->generic->next->sym->module)
&& gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Generic name '%s' of "
"function '%s' at %L being the same name as derived "
"type at %L", sym->name,