This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34137] New: Module function with ENTRY rejected
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2007 09:42:23 -0000
- Subject: [Bug fortran/34137] New: Module function with ENTRY rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program should print
12
-14.0000000
but gfortran rejects it with
Error: Contained function 'master.0.func' at (1) has no IMPLICIT type
It fails with GCC 4.1.3, 4.2.1 and 4.3.0 with:
end module m
1
Error: Contained function 'master.0.func' at (1) has no IMPLICIT type
The same program compiles with NAG f95, g95, ifort. If one puts the procedure
not into a module, it works.
module m
implicit none
contains
function func(a)
integer :: a, func
real :: ent
func = a*4
return
entry ent(a)
ent = -a*2.0
return
end function func
end module m
program main
use m
implicit none
print *, func(3)
print *, ent(7)
end program main
--
Summary: Module function with ENTRY rejected
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 32834,34079
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34137