This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30068] Ambigous interfaces not detected
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2006 22:02:36 -0000
- Subject: [Bug fortran/30068] Ambigous interfaces not detected
- References: <bug-30068-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2006-12-05 22:02 -------
> Right now, I cannot see why BAD9 does not throw an error - the code in
> interface.c looks OK.
Ahhh, yes I can. gfc recurses through the formal interfaces of dummy
procedures - it actually does it correctly too!
Index: gcc/fortran/interface.c
===================================================================
*** gcc/fortran/interface.c (revision 119554)
--- gcc/fortran/interface.c (working copy)
*************** compare_type_rank_if (gfc_symbol * s1, g
*** 462,468 ****
if (s1->attr.function && compare_type_rank (s1, s2) == 0)
return 0;
! return compare_interfaces (s1, s2, 0); /* Recurse! */
}
--- 462,468 ----
if (s1->attr.function && compare_type_rank (s1, s2) == 0)
return 0;
! return 1; /* Recurse! */
}
Fixes the problem and regtests OK.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30068