Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c	(revision 198596)
+++ gcc/fortran/interface.c	(working copy)
@@ -1030,7 +1030,8 @@ check_dummy_characteristics (gfc_symbol *s1, gfc_s
     return s1 == s2 ? true : false;
 
   /* Check type and rank.  */
-  if (type_must_agree && !compare_type_rank (s2, s1))
+  if (type_must_agree &&
+      (!compare_type_rank (s1, s2) || !compare_type_rank (s2, s1)))
     {
       snprintf (errmsg, err_len, "Type/rank mismatch in argument '%s'",
 		s1->name);
