Lahey/GNU Fortran

Compiler and Linker Options (or Switches)

You can control compilation and linking by using the options presented in the following sections. These options are not case sensitive. Some options apply only to the compilation phase, others to the linking phase, and still others (-g and -win) to both phases; this is indicated next to the name of the option. If compilation and linking are performed separately (i.e., in separate command lines), then options that apply to both phases must be included in each command line.

Option List:

-32 generate 32-bit i386 code

-64 generate 64-bit x86-64 code

-[n]ap ensure consistent arithmetic precision

-[n]c suppress linking

-[n]chk [<args>] checking

-[n]co display compiler options

-[n]cover generate coverage analysis information at runtime

-[n]dbl extend single precision reals to double precision

-[n]dll generate a dynamic link library

-[n]f95 enable F95 Standard conformance warnings

-[n]f2003 enable F2003 Standard conformance warnings

-[n]f2008 enable F2008 Standard conformance warnings

-[n]fix assume fixed form

-[n]g generate debugging information

-i <path> specify directory(s) containing include and module files

-[n]in no implicit typing

-[n]inline [<value>] inline user defined procedures

-[n]li all intrinsic procedures accepted

-lib <file> specify library for linker

-libpath <path> specify directory for linker to search for libraries

-[n]long extend integer*4 to integer*8

-map <name> generate map file

-[n]maxfatals <value> specify maximum fatal errors before stopping

-ml <target> specify mixed language target

-mod <path> path for module files

-o0 disable optimizations

-o1 optimize level-1

-o2 optimize level-2

-o3 optimize level-2

-os optimize for size

-ofast -o3 and not strict Standards compliance

-[n]openmp enable the OpenMP extensions

-out <name> specify output file name

-[n]parallel [<value>] parallelize loops to run in specified number of threads

-pass <option> pass option to GFortran

-[n]pause pause after console program completes

-[n]prefetch prefetch optimizations

-[n]private set default private accessibility

-[n]quad extend double precision reals to quad precision

-[n]sav save local variables

-[n]sse use SSE extensions for scalar floating-point arithmetic

-stack <value> set size of the stack

-t <arg> specify target processor

-[n]trace enable runtime error traceback

-[n]trap <args> trap ndp exceptions

-[n]unroll [<value>] control loop unrolling

-[n]verbose verbose output

-version display version information

-[n]w display warnings

-[n]wide wide fixed form line length

-win create Windows application

-winconsole create Windows console application

-[n]wisk use Winteracter Starter Kit

-[n]wpo whole program optimizations

See Also

Specifying Options