public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31474]  New: insert_bbt(): Duplicate key found!
@ 2007-04-04 18:51 michael dot a dot richmond at nasa dot gov
  2007-04-04 19:48 ` [Bug fortran/31474] ENTRY & procedural pointer: " burnus at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2007-04-04 18:51 UTC (permalink / raw)
  To: gcc-bugs

When I compile the module listed below, gfortran produces the message:

c1.f90:14.18:
     ENTRY cx_radc(r, z)
                 1
Internal Error at (1):
insert_bbt(): Duplicate key found!

   MODULE complex

     TYPE cx
       REAL :: real, imag
     END TYPE cx

     INTERFACE OPERATOR  (+)
       MODULE PROCEDURE cx_cadr, cx_radc
     END INTERFACE

     CONTAINS

     FUNCTION cx_cadr(z, r)
     ENTRY cx_radc(r, z)
       REAL             :: cx_cadr, cx_radc
       TYPE (cx), INTENT(IN) :: z
       REAL, INTENT(IN) :: r
       cx_cadr = z%real
     END FUNCTION cx_cadr
   END MODULE complex


-- 
           Summary: insert_bbt(): Duplicate key found!
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot a dot richmond at nasa dot gov


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/31474] ENTRY & procedural pointer: insert_bbt(): Duplicate key found!
  2007-04-04 18:51 [Bug fortran/31474] New: insert_bbt(): Duplicate key found! michael dot a dot richmond at nasa dot gov
@ 2007-04-04 19:48 ` burnus at gcc dot gnu dot org
  2007-04-05  7:29 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-04-04 19:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2007-04-04 20:47 -------
The problem seems to occur with procedure pointers to ENTRY points 


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2007-04-04 20:47:59
               date|                            |
            Summary|insert_bbt(): Duplicate key |ENTRY & procedural pointer:
                   |found!                      |insert_bbt(): Duplicate key
                   |                            |found!


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/31474] ENTRY & procedural pointer: insert_bbt(): Duplicate key found!
  2007-04-04 18:51 [Bug fortran/31474] New: insert_bbt(): Duplicate key found! michael dot a dot richmond at nasa dot gov
  2007-04-04 19:48 ` [Bug fortran/31474] ENTRY & procedural pointer: " burnus at gcc dot gnu dot org
@ 2007-04-05  7:29 ` pault at gcc dot gnu dot org
  2007-05-10 20:30 ` patchapp at dberlin dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-05  7:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2007-04-05 08:28 -------
(In reply to comment #1)

> The problem seems to occur with procedure pointers to ENTRY points 

>From a quick look at decl.c(get_proc_name), the modifications that I added, to
get module procedures with entries to work at all, ignored the possibility that
there would be an existing symtree at module level.
...snip...
  /* Module function entries will already have a symtree in
     the current namespace but will need one at module level.  */
  if (module_fcn_entry)
    st = gfc_new_symtree (&gfc_current_ns->parent->sym_root, name);
  else
    st = gfc_new_symtree (&gfc_current_ns->sym_root, name);
...snip...

is almost certainly the cause of the trouble.  I have a build/regtest going on
right now (and I should be paying attention to something else:)), so I canot do
anything about it until this afternoon.  However, I can see what to do and will
take it on.

Thank you for the report, Michael.

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-04-04 20:47:59         |2007-04-05 08:28:53
               date|                            |


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/31474] ENTRY & procedural pointer: insert_bbt(): Duplicate key found!
  2007-04-04 18:51 [Bug fortran/31474] New: insert_bbt(): Duplicate key found! michael dot a dot richmond at nasa dot gov
  2007-04-04 19:48 ` [Bug fortran/31474] ENTRY & procedural pointer: " burnus at gcc dot gnu dot org
  2007-04-05  7:29 ` pault at gcc dot gnu dot org
@ 2007-05-10 20:30 ` patchapp at dberlin dot org
  2007-05-11  6:20 ` pault at gcc dot gnu dot org
  2007-05-11  6:20 ` pault at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-10 20:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from patchapp at dberlin dot org  2007-05-10 21:30 -------
Subject: Bug number PR31474

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-05/msg00748.html


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/31474] ENTRY & procedural pointer: insert_bbt(): Duplicate key found!
  2007-04-04 18:51 [Bug fortran/31474] New: insert_bbt(): Duplicate key found! michael dot a dot richmond at nasa dot gov
                   ` (3 preceding siblings ...)
  2007-05-11  6:20 ` pault at gcc dot gnu dot org
@ 2007-05-11  6:20 ` pault at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-05-11  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2007-05-11 07:20 -------
Fixed on trunk

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/31474] ENTRY & procedural pointer: insert_bbt(): Duplicate key found!
  2007-04-04 18:51 [Bug fortran/31474] New: insert_bbt(): Duplicate key found! michael dot a dot richmond at nasa dot gov
                   ` (2 preceding siblings ...)
  2007-05-10 20:30 ` patchapp at dberlin dot org
@ 2007-05-11  6:20 ` pault at gcc dot gnu dot org
  2007-05-11  6:20 ` pault at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-05-11  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2007-05-11 07:20 -------
Subject: Bug 31474

Author: pault
Date: Fri May 11 06:19:57 2007
New Revision: 124613

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124613
Log:
2007-05-11  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/31474
        * decl.c (get_proc_name): If an entry has already been declared
        as a module procedure, pick up the symbol and the symtree and
        use them for the entry.

2007-05-11  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/31474
        * gfortran.dg/entry_10.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/entry_10.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-05-11  6:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-04 18:51 [Bug fortran/31474] New: insert_bbt(): Duplicate key found! michael dot a dot richmond at nasa dot gov
2007-04-04 19:48 ` [Bug fortran/31474] ENTRY & procedural pointer: " burnus at gcc dot gnu dot org
2007-04-05  7:29 ` pault at gcc dot gnu dot org
2007-05-10 20:30 ` patchapp at dberlin dot org
2007-05-11  6:20 ` pault at gcc dot gnu dot org
2007-05-11  6:20 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).