[Bug fortran/59720] [OOP] class/extends, multiple generic assignment

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 8 15:55:00 GMT 2014


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |janus at gcc dot gnu.org

--- Comment #2 from janus at gcc dot gnu.org ---
It is fixed by this simple patch:

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c    (revision 206428)
+++ gcc/fortran/interface.c    (working copy)
@@ -1513,7 +1513,8 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol
     else
       {
         /* Only check type and rank.  */
-        if (!compare_type (f2->sym, f1->sym))
+        if (!compare_type (f1->sym, f2->sym)
+        || !compare_type (f2->sym, f1->sym))
           {
         if (errmsg != NULL)
           snprintf (errmsg, err_len, "Type mismatch in argument '%s' "



More information about the Gcc-bugs mailing list