https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77406

--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
Previous patch was bogus.  Try this one:

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c     (revision 239833)
+++ gcc/fortran/interface.c     (working copy)
@@ -1616,8 +1616,13 @@ gfc_compare_interfaces (gfc_symbol *s1, 
   f1 = gfc_sym_get_dummy_args (s1);
   f2 = gfc_sym_get_dummy_args (s2);

+  /* Special case: No arguments.  */
   if (f1 == NULL && f2 == NULL)
-    return 1;                  /* Special case: No arguments.  */
+    return 1;
+
+  /* Special case: only alternate return.  */
+  if (f1 && f1->sym == NULL && f2 && f2->sym == NULL)
+    return 1;

   if (generic_flag)
     {

Reply via email to