[Bug fortran/33499] Rejects valid module with a contained function with an ENTRY
pault at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 23 10:59:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list