This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/33499] Rejects valid module with a contained function with an ENTRY



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]