http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38894

--- Comment #8 from janus at gcc dot gnu.org 2012-04-25 19:47:52 UTC ---
The errors in comment #5 - #7 can be fixed by the following patch:


Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c    (revision 186596)
+++ gcc/fortran/interface.c    (working copy)
@@ -404,6 +404,13 @@ gfc_compare_derived_types (gfc_symbol *derived1, g
       && strcmp (derived1->module, derived2->module) == 0)
     return 1;

+  /* Types from intrinsinc modules (like ISO_C_BINDING) might be renamed,
+     but can still be identified via their 'intmod_sym_id'.  */
+  if (derived1->from_intmod != INTMOD_NONE
+      && derived1->from_intmod == derived2->from_intmod
+      && derived1->intmod_sym_id == derived2->intmod_sym_id)
+    return 1;
+
   /* Compare type via the rules of the standard.  Both types must have
      the SEQUENCE or BIND(C) attribute to be equal.  */

Reply via email to