[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-06-27 Thread dfranke at gcc dot gnu dot org


--- Comment #3 from dfranke at gcc dot gnu dot org  2007-06-27 21:05 ---
Confirmed after updating to 20070627 (r126063).

Most likely introduced by:
r126000 | pault | 2007-06-25 20:27:59 +0200 (Mo, 25 Jun 2007) | 21 lines

(r125988 still works and r126005 gives the error). 

Adding Paul as CC.


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pault at gcc dot gnu dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  Known to fail||4.3.0
  Known to work||4.2.1
   Last reconfirmed|-00-00 00:00:00 |2007-06-27 21:05:26
   date||
Summary|Spurious error: Name 'x' at |[4.3 regression] Spurious
   |(1) is an ambiguous |error: Name 'x' at (1) is an
   |reference to 'x' from module|ambiguous reference to 'x'
   |'y' |from module 'y'


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-06-30 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-07-03 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2007-07-03 09:38 ---

> Adding Paul as CC.
> 

I'll try to gt to it this afternoon.

Thanks

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-07-04 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2007-07-04 08:58 ---
(In reply to comment #4)
> > Adding Paul as CC.

This is indeed my doing - sorry. The cause is

PR fortran/31494
* match.c (gfc_match_call): If a host associated symbol is not
a subroutine, build a new symtree/symbol in the current name
space.

I have not understood why this is happening yet, in spite of hanging
diagnostics on both versions of gfc_match_call.  The following fixes the
problem and bootstrap/regtests OK:

Index: gcc/fortran/module.c
===
*** gcc/fortran/module.c(revision 126214)
--- gcc/fortran/module.c(working copy)
*** read_module (void)
*** 3574,3580 
  if (st != NULL)
{
  /* Check for ambiguous symbols.  */
! if (st->n.sym != info->u.rsym.sym)
st->ambiguous = 1;
  info->u.rsym.symtree = st;
}
--- 3574,3581 
  if (st != NULL)
{
  /* Check for ambiguous symbols.  */
! if (st->n.sym != info->u.rsym.sym
!   && !st->n.sym->attr.generic)
st->ambiguous = 1;
  info->u.rsym.symtree = st;
}

However, I want to understand the necessity of this before submitting it.  I
think that I am 24 hours away from this.

Paul

PS Michael, that's a very pretty fortran OO example - thanks for the report. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-07-04 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2007-07-04 14:05 ---
(In reply to comment #5)

OK, I now have it understood.  The patch in the previous comment is the clue. 
The patch for pr31494 was marking generic interfaces as subroutines, thereby
screwing up the mechanism for detecting ambiguity.

The "correct" solution is regtesting, right now.

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|NEW |ASSIGNED
   Last reconfirmed|2007-06-27 21:05:26 |2007-07-04 14:05:56
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-07-04 Thread patchapp at dberlin dot org


--- Comment #7 from patchapp at dberlin dot org  2007-07-04 17:15 ---
Subject: Bug number PR32526

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00381.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-07-04 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2007-07-05 06:50 ---
Subject: Bug 32526

Author: pault
Date: Thu Jul  5 06:49:54 2007
New Revision: 126354

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126354
Log:
2007-07-05  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/32526
* match.c (gfc_match_call): Check, in all cases, that a symbol
is neither generic nor a subroutine before trying to add it as
a subroutine.

PR fortran/32613
* match.c (gfc_match_do): Reset the implied_index attribute.

2007-07-05  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/32526
* gfortran.dg/interface_14.f90: New test.

PR fortran/32613
* gfortran.dg/do_iterator_2.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/do_iterator_2.f90
trunk/gcc/testsuite/gfortran.dg/interface_14.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526



[Bug fortran/32526] [4.3 regression] Spurious error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'y'

2007-07-05 Thread pault at gcc dot gnu dot org


--- Comment #9 from pault at gcc dot gnu dot org  2007-07-05 11:01 ---
fixed on trunk - thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32526