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/30068] Ambigous interfaces not detected



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


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