Fortran 2018 compiler standard enforcement

Both Gfortran and Intel Fortran compilers have options for enforcing the Fortran 2018 standard. The compilers raise additional warnings or errors for code that is not deemed compliant with the Fortran 2018 standard.

It’s also important in code you’re responsible for to always use implicit none so that each variable must be assigned beforehand. We recommend the Fortran 2018 statement:

implicit none (type, external)

which requires procedure interfaces to be explicitly defined as well.

  • type: the traditional implicit none default
  • external: new for Fortran 2018, requires external procedures to have an explicit interface.


Gfortran 8 added -std=f2018 option to enforce Fortran 2018 standard support.

Get the latest Gfortran by:

At minimum a modern Fortran program should use these Gfortran options:

gfortran -std=f2018 -Wall -fimplicit-none


The PGI Fortran compiler pgfortran can enforce implicit none via:

pgfortran -Mdclchk

Intel Fortran

The currently supported Intel compilers should be used with at least these options for modern Fortran programs:

Linux / MacOS

ifort -stand f18 -warn


ifort /stand:f18 /warn


NAG 7.0 added the Fortran 2018 standard:

nagfor -f2018