I've committed the following to both 6-branch and trunk.

2016-10-28  Steven G. Kargl <ka...@gcc.gnu.org>

        PR fortran/71891
        * symbol.c (gfc_type_compatible): Fix typo.

Index: symbol.c
===================================================================
--- symbol.c    (revision 241668)
+++ symbol.c    (working copy)
@@ -4861,7 +4861,7 @@ gfc_type_compatible (gfc_typespec *ts1, 
       && !is_union1 && !is_union2)
     return (ts1->type == ts2->type);
 
-  if ((is_derived1 && is_derived2) || (is_union1 && is_union1))
+  if ((is_derived1 && is_derived2) || (is_union1 && is_union2))
     return gfc_compare_derived_types (ts1->u.derived, ts2->u.derived);
 
   if (is_derived1 && is_class2)

-- 
Steve

Reply via email to