This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/77406] ICE in generic_correspondence, at fortran/interface.c:1123


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)
     {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]