public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24558]  New: ENTRY doesn't work in module procedures
@ 2005-10-27 12:40 eedelman at gcc dot gnu dot org
  2005-10-27 23:12 ` [Bug fortran/24558] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-10-27 12:40 UTC (permalink / raw)
  To: gcc-bugs

With explicitely declared types for a function and it's entry points, I get a
'Duplicate key found!' error:

kl-nrb:~$ cat test_entry_2.f90 
module foo
contains
    function n1()
        integer :: n1, n2
        n1 = 1
        return
    entry n2()
        n2 = 2
        return
    end function n1
end module foo

program bar

    use foo

    print *, n1()
    print *, n2()

end program bar
kl-nrb:~$ gfortran41 test_entry_2.f90
 In file test_entry_2.f90:8

    entry n2()
           1
 Internal Error at (1):
 insert_bbt(): Duplicate key found!


If I remove the explicit type declarations, I get a spurious warning and wierd
results:
kl-nrb:~$ cat test_entry_2b.f90 
module foo
contains
    function n1()
        n1 = 1
        return
    entry n2()
        n2 = 2
        return
    end function n1
end module foo

program bar

    use foo

    print *, n1()
    print *, n2()

end program bar
kl-nrb:~$ gfortran41 test_entry_2b.f90
test_entry_2b.f90: In function 'master.0.n1':
test_entry_2b.f90:8: warning: Function return value not set
kl-nrb:~$ a.out
   134519120
   134519120


-- 
           Summary: ENTRY doesn't work in module procedures
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eedelman at gcc dot gnu dot org


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


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

end of thread, other threads:[~2006-06-11 22:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27 12:40 [Bug fortran/24558] New: ENTRY doesn't work in module procedures eedelman at gcc dot gnu dot org
2005-10-27 23:12 ` [Bug fortran/24558] " pinskia at gcc dot gnu dot org
2006-03-14 15:14 ` pinskia at gcc dot gnu dot org
2006-03-15  8:15 ` pault at gcc dot gnu dot org
2006-05-30  7:43 ` pault at gcc dot gnu dot org
2006-05-31 12:45 ` patchapp at dberlin dot org
2006-06-09 22:16 ` pault at gcc dot gnu dot org
2006-06-11 22:33 ` pault at gcc dot gnu dot org
2006-06-11 22:34 ` 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).