      PROGRAM TEST_DCOPY
      IMPLICIT REAL*8 (A-H,O-Z)
      ALLOCATABLE :: X(:), Y(:)
      DIMENSION N(2)

      N(1)=1220480320
*     N(1)=220480320
      N(2)=0
      ALLOCATE(X(N(1)))
      DO I=1,N(1)
        X(I)=3.14159e-2
      END DO
      THUMB=SQRT(DDOT(N(1),X,1,X,1))
      WRITE(6,*) THUMB

      ALLOCATE(Y(N(1)))
      DO I=1,N(1)
        Y(I)=1.123
      END DO
      CALL DCOPY(N(1),X,1,Y,1)
      DO I=1,N(1)
        IF(X(I).NE.Y(I)) THEN
            PRINT*, 'wrong, I = ', I
            PRINT*, 'X(I) = ', X(I)
            PRINT*, 'Y(I) = ', Y(I)
            STOP
        END IF
      END DO
      THUMB=SQRT(DDOT(N(1),Y,1,Y,1))
      WRITE(6,*) THUMB
      END
