The argument to function CPY is of the wrong type, and this is diagnosed. NAG Fortran Compiler Release 5.2(668) Error: ex_07.1.2.f90, line 135: Incorrect data type REAL (expected DOUBLE PRECISION) for argument ARG (no. 1) of COPY Error: ex_07.1.2.f90, line 137: Incorrect data type REAL (expected DOUBLE PRECISION) for argument ARG (no. 1) of COPY [NAG Fortran Compiler error termination, 2 errors]