This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33542] gfortran does not detect ambigious specific names if they are the same as generic names
- 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: 30 Sep 2007 16:53:34 -0000
- Subject: [Bug fortran/33542] gfortran does not detect ambigious specific names if they are the same as generic names
- References: <bug-33542-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 2007-09-30 16:53 -------
(In reply to comment #1)
> Re-reading the Fortran standard, I believe now that already "call foo(10)" is
> invalid (although it is not ambiguous).
In fact, I believe that the ambiguity in the interface is an error; this one
liner fixes the PR -
Index: /svn/trunk/gcc/fortran/interface.c
===================================================================
*** /svn/trunk/gcc/fortran/interface.c (revision 128873)
--- /svn/trunk/gcc/fortran/interface.c (working copy)
*************** check_interface1 (gfc_interface *p, gfc_
*** 1044,1050 ****
if (p->sym->name == q->sym->name && p->sym->module == q->sym->module)
continue;
! if (compare_interfaces (p->sym, q->sym, generic_flag))
{
if (referenced)
{
--- 1044,1051 ----
if (p->sym->name == q->sym->name && p->sym->module == q->sym->module)
continue;
! if (compare_interfaces (p->sym, q->sym, generic_flag)
! || p->sym->name == q->sym->name)
{
if (referenced)
{
It's just now regtesting.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-09-30 16:53:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33542