LF Fortran 95

-[N]INLINE [(arg[,arg[,...]])]

Inline Code

Compile only. Default: -ninline

Specify -inline to cause user-defined procedures to be inserted inline at the point they are referenced in the calling code. This option only affects code which is in the same source file as the calling procedure. Intrinsic functions, module procedures and internal procedures are not inlined.

Multiple arguments are separated by commas. At least one argument must be present.

If arg is a number, any user defined procedure with total lines of executable code smaller than arg is inlined. This argument may only appear once in the list.

If arg is a number with the letter capital “K” appended, arrays which have a size less than arg kilobytes are inlined. Inlining arrays can enhance the optimization abilities of the compiler. This argument may only appear once in the list.

If arg is a procedure name, or comma separated list of procedure names, the named procedures are inlined.

If arg is absent, all procedures having fewer than 30 lines of code and all local data are inlined.

Use of the -inline option may cause long compile times, and may lead to very large executables.

Visual Studio Property

The -inline option is set using the Fortran|Optimization|Inlining property. This option can be set on the property page for the project only.


LF95 hello.f90 -inline (250,250K,foo)

The above command causes procedures in the same source file as hello.f90 to be inlined if they have fewer than 250 lines of executable code or are named foo; all arrays smaller than 250kb are inlined.

See Also

Setting Build Options