This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77406] ICE in generic_correspondence, at fortran/interface.c:1123
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Aug 2016 21:35:59 +0000
- Subject: [Bug fortran/77406] ICE in generic_correspondence, at fortran/interface.c:1123
- Auto-submitted: auto-generated
- References: <bug-77406-4@http.gcc.gnu.org/bugzilla/>
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)
{