public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34137] New: Module function with ENTRY rejected
@ 2007-11-18 9:42 burnus at gcc dot gnu dot org
2007-11-18 16:35 ` [Bug fortran/34137] " burnus at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-11-18 9:42 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/34137] Module function with ENTRY rejected
2007-11-18 9:42 [Bug fortran/34137] New: Module function with ENTRY rejected burnus at gcc dot gnu dot org
@ 2007-11-18 16:35 ` burnus at gcc dot gnu dot org
2007-11-18 17:14 ` burnus at gcc dot gnu dot org
2007-11-20 5:04 ` patchapp at dberlin dot org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-11-18 16:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-11-18 16:35 -------
Subject: Bug 34137
Author: burnus
Date: Sun Nov 18 16:35:12 2007
New Revision: 130270
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130270
Log:
2007-11-18 Tobias Burnus <burnus@net-b.de>
PR fortran/34137
* primary.c (match_variable): Reject non-result entry symbols.
* resolve.c (resolve_contained_fntype): Do not check entry
* master functions.
2007-11-18 Tobias Burnus <burnus@net-b.de>
PR fortran/34137
* gfortran.dg/entry_14.f90: New.
* gfortran.dg/entry_15.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/entry_14.f90
trunk/gcc/testsuite/gfortran.dg/entry_15.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34137
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/34137] Module function with ENTRY rejected
2007-11-18 9:42 [Bug fortran/34137] New: Module function with ENTRY rejected burnus at gcc dot gnu dot org
2007-11-18 16:35 ` [Bug fortran/34137] " burnus at gcc dot gnu dot org
@ 2007-11-18 17:14 ` burnus at gcc dot gnu dot org
2007-11-20 5:04 ` patchapp at dberlin dot org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-11-18 17:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2007-11-18 17:14 -------
FIXED on the trunk (4.3.0). Was simpler than I thought.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to fail| |4.1.3 4.2.2 4.3.0
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34137
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/34137] Module function with ENTRY rejected
2007-11-18 9:42 [Bug fortran/34137] New: Module function with ENTRY rejected burnus at gcc dot gnu dot org
2007-11-18 16:35 ` [Bug fortran/34137] " burnus at gcc dot gnu dot org
2007-11-18 17:14 ` burnus at gcc dot gnu dot org
@ 2007-11-20 5:04 ` patchapp at dberlin dot org
2 siblings, 0 replies; 4+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-20 5:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from patchapp at dberlin dot org 2007-11-20 05:04 -------
Subject: Bug number PR34137
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-11/msg00965.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34137
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-20 5:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-18 9:42 [Bug fortran/34137] New: Module function with ENTRY rejected burnus at gcc dot gnu dot org
2007-11-18 16:35 ` [Bug fortran/34137] " burnus at gcc dot gnu dot org
2007-11-18 17:14 ` burnus at gcc dot gnu dot org
2007-11-20 5:04 ` patchapp at dberlin 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).