      LOGICAL FUNCTION CLOC(X,Y)
C     -------------------
C     X AND Y ARE ARRAYS. IT IS ASSUMED THAT X(1) AND Y(1) CONTAIN DATA.
C
C     CLOC(X,Y) = .TRUE.   IF X AND Y BEGIN IN THE SAME LOCATION
C     CLOC(X,Y) = .FALSE.  IF X AND Y BEGIN IN DIFFERENT LOCATIONS
C
C     IT IS RECOMMENDED THAT THIS CODING NOT BE OPTIMIZED BY ELIMINATING
C     THE SUBROUTINE CYCHG. IF IT IS OPTIMIZED THEN CLOC MAY NOT COMPILE
C     PROPERLY.
C     -------------------
      COMPLEX X(1),Y(1),XOLD,YOLD
      XOLD = X(1)
      YOLD = Y(1)
      CALL CYCHG(X,Y,YOLD)
      IF (X(1) .EQ. XOLD) GO TO 10
C
C     X AND Y BEGIN IN THE SAME LOCATION
C
      Y(1) = YOLD
      CLOC = .TRUE.
      RETURN
C
C     X AND Y BEGIN IN DIFFERENT LOCATIONS
C
   10 Y(1) = YOLD
      CLOC = .FALSE.
      RETURN
      END
