[Bug fortran/77406] ICE in generic_correspondence, at fortran/interface.c:1123
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 29 21:02:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77406
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #1 from kargl at gcc dot gnu.org ---
With the following patch, I get
/mnt/sgk/tmp/a.f90:6:9:
end
1
Error: Ambiguous interfaces 's2' and 's1' in generic interface 's' at (1)
Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c (revision 239833)
+++ gcc/fortran/interface.c (working copy)
@@ -1616,8 +1616,10 @@ gfc_compare_interfaces (gfc_symbol *s1,
f1 = gfc_sym_get_dummy_args (s1);
f2 = gfc_sym_get_dummy_args (s2);
- if (f1 == NULL && f2 == NULL)
- return 1; /* Special case: No arguments. */
+ /* Special cases: No arguments or only alternate return. */
+ if ((f1 == NULL && f2 == NULL)
+ || (f1->sym == NULL && f2->sym == NULL))
+ return 1;
if (generic_flag)
{
Note sure if the patch is correct.
More information about the Gcc-bugs
mailing list