This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/53111] [4.7/4.8 Regression] Derived types cannot be USE-associated again with -std=f95


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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]