This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24558] New: ENTRY doesn't work in module procedures
- From: "eedelman at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2005 12:40:20 -0000
- Subject: [Bug fortran/24558] New: ENTRY doesn't work in module procedures
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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