      DOUBLE PRECISION FUNCTION WDOTCR (N, XR, XI, INCX, YR, YI, INCY)
      IMPLICIT NONE
C
      INTEGER N, INCX, INCY
      DOUBLE PRECISION XR(*), XI(*), YR(*), YI(*)
C
      INTEGER I, IX, IY
      DOUBLE PRECISION S
C
      DOUBLE PRECISION FLOP
C
C
      S = 0.0D0
      IF (N.LE.0) GO TO 20
      IX = 1
      IY = 1
      IF (INCX.LT.0) IX = (-N+1)*INCX+1
      IF (INCY.LT.0) IY = (-N+1)*INCY+1
      DO 10 I = 1, N
        S = FLOP (S+XR(IX)*YR(IY)+XI(IX)*YI(IY))
        IX = IX+INCX
        IY = IY+INCY
10    CONTINUE
C
20    CONTINUE
      WDOTCR = S
C
      RETURN
      END
