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.
At minimum a modern Fortran program should use these Gfortran options:
gfortran -std=f2018 -Wall -fimplicit-none
The PGI Fortran compiler
pgfortran is building up Fortran 2018 standard compliance.
In general, one should uniformly enforce
implicit none via:
The currently supported Intel compilers should be used with at least these options for modern Fortran programs:
Linux / MacOS
ifort -stand f18 -implicitnone -W1
ifort /stand:f18 /4Yd /W1