NAG gives Fortran Modernisation workshops with detailed notes, which describe the “polishing” options of the NAG compiler, Reinhold Bader has a presentation on the same topic, and the Fortran Wiki has a page.
Before adding features from Fortran 2003 and beyond one can check a code with the g95 compiler with the options
g95 -Wall -Wextra -Wimplicit-none -Werror=100,113,115,137,146,147,159,163 -ftrace=full -fbounds-check -freal=nan -fmodule-private -Wno=112,167
If one of the -Werror
options causes the code to not compile, an explanatory error message is provided.