The symbol DP is imported in two USE statements, which is not allowed because it is ambiguous, and so the compiler uses neither - which causes later errors. Not all compilers will do the same following the first error (double import), and so later messages will vary. NAG Fortran Compiler Release 5.2(668) Error: ex_08.4.5.f90, line 5: Symbol DP found both in module DOUBLE and in LAPACK detected at =@DP Error: ex_08.4.5.f90, line 5: Implicit type for DP detected at DP@) Error: ex_08.4.5.f90, line 5: DP is not a constant detected at _@DP Warning: ex_08.4.5.f90, line 21: Symbol DP referenced but never set detected at MAIN@ [NAG Fortran Compiler pass 1 error termination, 3 errors, 1 warning]