This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33499] Rejects valid module with a contained function with an ENTRY
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Nov 2007 10:59:08 -0000
- Subject: [Bug fortran/33499] Rejects valid module with a contained function with an ENTRY
- References: <bug-33499-14284@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pault at gcc dot gnu dot org 2007-11-23 10:59 -------
A workaround is to put the ENTRY declaration after the type specification:
MODULE complex
IMPLICIT NONE
PRIVATE
PUBLIC :: cx, OPERATOR(+)
TYPE cx
REAL :: imag
END TYPE cx
INTERFACE OPERATOR (+)
MODULE PROCEDURE cx_cadr, cx_radc
END INTERFACE
CONTAINS
FUNCTION cx_cadr(z, r)
TYPE (cx) :: cx_cadr, cx_radc
TYPE (cx), INTENT(IN) :: z
REAL, INTENT(IN) :: r
ENTRY cx_radc(r, z)
cx_cadr%imag = z%imag
END FUNCTION cx_cadr
END MODULE complex
This is a dead giveaway as to where the problem is. I'm onto it!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33499