NAG Compiler

The NAG Fortran Compiler is robust, highly tested, and valued by developers all over the globe for its checking capabilities and detailed error reporting. The Compiler is available on Unix platforms as well as for Microsoft Windows and Mac OS X. Release 6.0 has extensive support for both legacy and modern Fortran features, and also supports parallel programming with OpenMP.

The NAG Compiler provides support for:

  • Fortran 2008 (partial)
  • Fortran 2003 (almost complete)
  • Fortran 95
  • OpenMP 3.1
  • OpenMP 3.0

"My programs are much cleaner thanks to the new features in the NAG Fortran Compiler. This may seem like a minor issue, but there are literally hundreds of routines in my programs which pass arrays between them, and simpler interfaces lead to fewer mistakes. It's also useful to be able to write subroutines which decide the size of their return arrays internally, and to have allocatable arrays as structure components."
- Ian Thompson, Research Associate at Loughborough University

The NAG Compiler also provides:

  • Fortran pretty printer ("polisher");
  • Dependency generator for module and include files;
  • Call-graph generator;
  • Interface builder.


The NAG Fortran Compiler is available on Unix, Microsoft Windows and Apple Mac platforms. For users of Microsoft Windows NAG has developed NAG Fortran Builder, an Integrated Development Environment (IDE) for the NAG Fortran Compiler.

Enhancements at Release 6.0

Release 6.0 is a major release adding new features and improvement beyond the last release (5.3.1).

The most important new features introduced in the NAG Fortran Compiler Release 6.0 are listed here.


  • Support for OpenMP 3.1 in addition to OpenMP 3.0


  • Maximum rank of an array is increased.
  • Internal procedures can be passed as actual arguments or assigned to a procedure pointer.
  • G0 and G0.d edit descriptors, and * (infinite) repeat factor.
  • CONTIGUOUS attribute and IS_CONTIGUOUS intrinsic function.
  • ERF, ERFC, ERFC_SCALED, GAMMA, LOG_GAMMA intrinsic functions.
  • Implied-shape named array constants.
  • ERROR_STOP statement.


  • Kind type parameters for derived types.


  • New interface generator (nagfor =interfaces)
  • Additional options within the polisher tool

Many other miscellaneous improvements including additional error checking and compiler options.

Enhancements at Release 5.3.1

Release 5.3.1 was an incremental improvement on the last major release of the NAG Fortran Compiler Release 5.3. The most important new features introduced in Release 5.3.1 are listed here.

  • Additional OpenMP 3.0 support
  • A number of new Fortran 2008 intrinsics and other language features
  • Optional integer overflow detection capability

These add to the new features introduced in Release 5.3.

Regular Updates

To ensure that we fulfil your existing and future requirements, the Compiler is regularly updated with new and enhanced features.

Online Documentation

The Compiler is accompanied by first-class electronic help guides giving you the detailed information you need to carry out your work quickly and effectively. A PDF version of the NAG Fortran Compiler manual is also provided.

Expert Support

Subscription to our dedicated Technical Support Service includes automatic notification of updates and access to our domain experts who are there to assist you with your technical queries or difficulties.

Quality Assurance

The correctness and performance of the Compiler are verified daily and before each release, using an extensive test suite which comprises twenty years' worth of test cases covering all aspects of accuracy and behaviour. The Fortran experts in the NAG Technical Support Service rapidly turn around enquiries and requests from customers, and each release of the Compiler aggregates all improvements that have been applied to prior versions.