17-09-2021

Lahey Fortran Professional v7.9 Windows Combining the 32/64-bit LGF Rainier compiler with the classic Lahey/Fujitsu LF95 compiler, LF Professional v7.9 delivers! LGF Rainier has full Fortran 95/90/77 compliance with extensive support for the Fortran 2003 and 2008 standards. Lahey/Fujitsu LF95 offers best in class diagnostics. As I state in other answers before I begin, I need to point out that I work for Intel, who manufacturers and makes available quite possibly the most used production quality Fortran compiler (a.k.a. The Intel® Fortran Compiler is built on a long history of generating optimized code that supports industry standards while taking advantage of built-in technology for Intel® Xeon® Scalable processors and Intel® Core™ processors. Staying aligned with Intel’s evolving and diverse architectures, the compiler now supports GPUs.

Next: Preprocessing Options, Previous: Option Summary, Up: Invoking GNU Fortran [Contents][Index]

2.2 Options controlling Fortran dialect

Fortran 90 Compiler Linux

The following options control the details of the Fortran dialectaccepted by the compiler:

-ffree-form
-ffixed-form

Specify the layout used by the source file. The free form layoutwas introduced in Fortran 90. Fixed form was traditionally used inolder Fortran programs. When neither option is specified, the sourceform is determined by the file extension.

-fall-intrinsics

This option causes all intrinsic procedures (including the GNU-specificextensions) to be accepted. This can be useful with -std=f95 toforce standard-compliance but get access to the full range of intrinsicsavailable with gfortran. As a consequence, -Wintrinsics-stdwill be ignored and no user-defined procedure with the same name as anyintrinsic will be called except when it is explicitly declared EXTERNAL.

-fallow-argument-mismatch

Some code contains calls to external procedures with mismatchesbetween the calls and the procedure definition, or with mismatchesbetween different calls. Such code is non-conforming, and will usuallybe flagged with an error. This options degrades the error to awarning, which can only be disabled by disabling all warnings via-w. Only a single occurrence per argument is flagged by thiswarning. -fallow-argument-mismatch is implied by-std=legacy.

Fortran 90 Compiler

Using this option is strongly discouraged. It is possible toprovide standard-conforming code which allows different types ofarguments by using an explicit interface and TYPE(*).

-fallow-invalid-boz

A BOZ literal constant can occur in a limited number of contexts instandard conforming Fortran. This option degrades an error conditionto a warning, and allows a BOZ literal constant to appear where theFortran standard would otherwise prohibit its use.

-fd-lines-as-code
-fd-lines-as-comments

Enable special treatment for lines beginning with d or Din fixed form sources. If the -fd-lines-as-code option isgiven they are treated as if the first column contained a blank. If the-fd-lines-as-comments option is given, they are treated ascomment lines.

-fdec

DEC compatibility mode. Enables extensions and other features that mimicthe default behavior of older compilers (such as DEC).These features are non-standard and should be avoided at all costs.For details on GNU Fortran’s implementation of these extensions see thefull documentation.

Other flags enabled by this switch are:-fdollar-ok-fcray-pointer-fdec-char-conversions-fdec-structure-fdec-intrinsic-ints-fdec-static-fdec-math-fdec-include-fdec-blank-format-item-fdec-format-defaults

If -fd-lines-as-code/-fd-lines-as-comments are unset, then-fdec also sets -fd-lines-as-comments.

-fdec-char-conversions

Enable the use of character literals in assignments and DATA statementsfor non-character variables.

-fdec-structure

Enable DEC STRUCTURE and RECORD as well as UNION,MAP, and dot (’.’) as a member separator (in addition to ’%’). This isprovided for compatibility only; Fortran 90 derived types should be usedinstead where possible.

-fdec-intrinsic-ints

Enable B/I/J/K kind variants of existing integer functions (e.g. BIAND, IIAND,JIAND, etc...). For a complete list of intrinsics see the full documentation.

-fdec-math

Enable legacy math intrinsics such as COTAN and degree-valued trigonometricfunctions (e.g. TAND, ATAND, etc...) for compatability with older code.

-fdec-static

Enable DEC-style STATIC and AUTOMATIC attributes to explicitly specifythe storage of variables and other objects.

-fdec-include

Enable parsing of INCLUDE as a statement in addition to parsing it asINCLUDE line. When parsed as INCLUDE statement, INCLUDE does not have tobe on a single line and can use line continuations.

-fdec-format-defaults

Enable format specifiers F, G and I to be used without width specifiers,default widths will be used instead.

-fdec-blank-format-item

Enable a blank format item at the end of a format specification i.e. nothingfollowing the final comma.

Fortran
-fdollar-ok

Allow ‘$’ as a valid non-first character in a symbol name. Symbols that start with ‘$’ are rejected since it is unclear which rules toapply to implicit typing as different vendors implement different rules.Using ‘$’ in IMPLICIT statements is also rejected.

-fbackslash

Change the interpretation of backslashes in string literals from a singlebackslash character to “C-style” escape characters. The followingcombinations are expanded a, b, f, n,r, t, v, , and 0 to the ASCIIcharacters alert, backspace, form feed, newline, carriage return,horizontal tab, vertical tab, backslash, and NUL, respectively.Additionally, xnn, unnnn andUnnnnnnnn (where each n is a hexadecimal digit) aretranslated into the Unicode characters corresponding to the specified codepoints. All other combinations of a character preceded by areunexpanded.

-fmodule-private

Set the default accessibility of module entities to PRIVATE.Use-associated entities will not be accessible unless they are explicitlydeclared as PUBLIC.

-ffixed-line-length-n

Set column after which characters are ignored in typical fixed-formlines in the source file, and, unless -fno-pad-source, through whichspaces are assumed (as if padded to that length) after the ends of shortfixed-form lines.

Popular values for n include 72 (thestandard and the default), 80 (card image), and 132 (correspondingto “extended-source” options in some popular compilers).n may also be ‘none’, meaning that the entire line is meaningfuland that continued character constants never have implicit spaces appendedto them to fill out the line.-ffixed-line-length-0 means the same thing as-ffixed-line-length-none.

-fno-pad-source

By default fixed-form lines have spaces assumed (as if padded to that length)after the ends of short fixed-form lines. This is not done either if-ffixed-line-length-0, -ffixed-line-length-none orif -fno-pad-source option is used. With any of those optionscontinued character constants never have implicit spaces appendedto them to fill out the line.

-ffree-line-length-n

Set column after which characters are ignored in typical free-formlines in the source file. The default value is 132.n may be ‘none’, meaning that the entire line is meaningful.-ffree-line-length-0 means the same thing as-ffree-line-length-none.

-fmax-identifier-length=n

Specify the maximum allowed identifier length. Typical values are31 (Fortran 95) and 63 (Fortran 2003 and Fortran 2008).

-fimplicit-none

Specify that no implicit typing is allowed, unless overridden by explicitIMPLICIT statements. This is the equivalent of addingimplicit none to the start of every procedure.

-fcray-pointer

Enable the Cray pointer extension, which provides C-like pointerfunctionality.

-fopenacc

Enable the OpenACC extensions. This includes OpenACC !$accdirectives in free form and c$acc, *$acc and!$acc directives in fixed form, !$ conditionalcompilation sentinels in free form and c$, *$ and!$ sentinels in fixed form, and when linking arranges for theOpenACC runtime library to be linked in.

-fopenmp

Enable the OpenMP extensions. This includes OpenMP !$omp directivesin free formand c$omp, *$omp and !$omp directives in fixed form,!$ conditional compilation sentinels in free formand c$, *$ and !$ sentinels in fixed form, and when linking arranges for the OpenMP runtime library to be linkedin. The option -fopenmp implies -frecursive.

-fno-range-check

Disable range checking on results of simplification of constantexpressions during compilation. For example, GNU Fortran will givean error at compile time when simplifying a = 1. / 0.With this option, no error will be given and a will be assignedthe value +Infinity. If an expression evaluates to a valueoutside of the relevant range of [-HUGE():HUGE()],then the expression will be replaced by -Inf or +Infas appropriate.Similarly, DATA i/Z'FFFFFFFF'/ will result in an integer overflowon most systems, but with -fno-range-check the value will“wrap around” and i will be initialized to -1 instead.

-fdefault-integer-8
Fortran 90 Compiler

Set the default integer and logical types to an 8 byte wide type. This optionalso affects the kind of integer constants like 42. Unlike-finteger-4-integer-8, it does not promote variables with explicitkind declaration.

-fdefault-real-8

Set the default real type to an 8 byte wide type. This option also affectsthe kind of non-double real constants like 1.0. This option promotesthe default width of DOUBLE PRECISION and double real constantslike 1.d0 to 16 bytes if possible. If -fdefault-double-8is given along with fdefault-real-8, DOUBLE PRECISIONand double real constants are not promoted. Unlike -freal-4-real-8,fdefault-real-8 does not promote variables with explicit kinddeclarations.

-fdefault-real-10

Set the default real type to an 10 byte wide type. This option also affectsthe kind of non-double real constants like 1.0. This option promotesthe default width of DOUBLE PRECISION and double real constantslike 1.d0 to 16 bytes if possible. If -fdefault-double-8is given along with fdefault-real-10, DOUBLE PRECISIONand double real constants are not promoted. Unlike -freal-4-real-10,fdefault-real-10 does not promote variables with explicit kinddeclarations.

-fdefault-real-16

Set the default real type to an 16 byte wide type. This option also affectsthe kind of non-double real constants like 1.0. This option promotesthe default width of DOUBLE PRECISION and double real constantslike 1.d0 to 16 bytes if possible. If -fdefault-double-8is given along with fdefault-real-16, DOUBLE PRECISIONand double real constants are not promoted. Unlike -freal-4-real-16,fdefault-real-16 does not promote variables with explicit kinddeclarations.

-fdefault-double-8

Set the DOUBLE PRECISION type and double real constantslike 1.d0 to an 8 byte wide type. Do nothing if thisis already the default. This option prevents -fdefault-real-8,-fdefault-real-10, and -fdefault-real-16,from promoting DOUBLE PRECISION and double real constants like1.d0 to 16 bytes.

-finteger-4-integer-8

Promote all INTEGER(KIND=4) entities to an INTEGER(KIND=8)entities. If KIND=8 is unavailable, then an error will be issued.This option should be used with care and may not be suitable for your codes.Areas of possible concern include calls to external procedures,alignment in EQUIVALENCE and/or COMMON, generic interfaces,BOZ literal constant conversion, and I/O. Inspection of the intermediaterepresentation of the translated Fortran code, produced by-fdump-tree-original, is suggested.

-freal-4-real-8
-freal-4-real-10
-freal-4-real-16
-freal-8-real-4
-freal-8-real-10
-freal-8-real-16

Fortran 90 Compiler For Linux Mint

Promote all REAL(KIND=M) entities to REAL(KIND=N) entities.If REAL(KIND=N) is unavailable, then an error will be issued.The -freal-4- flags also affect the default real kind and the-freal-8- flags also the double-precision real kind. All otherreal-kind types are unaffected by this option. The promotion is alsoapplied to real literal constants of default and double-precision kindand a specified kind number of 4 or 8, respectively.However, -fdefault-real-8, -fdefault-real-10,-fdefault-real-10, and -fdefault-double-8 take precedencefor the default and double-precision real kinds, both for real literalconstants and for declarations without a kind number.Note that for REAL(KIND=KIND(1.0)) the literal may get promoted andthen the result may get promoted again.These options should be used with care and may not be suitable for yourcodes. Areas of possible concern include calls to external procedures,alignment in EQUIVALENCE and/or COMMON, generic interfaces,BOZ literal constant conversion, and I/O and calls to intrinsic procedureswhen passing a value to the kind= dummy argument. Inspection of theintermediate representation of the translated Fortran code, produced by-fdump-fortran-original or -fdump-tree-original, is suggested.

-std=std

Fortran 90 Compiler Online

Specify the standard to which the program is expected to conform,which may be one of ‘f95’, ‘f2003’, ‘f2008’,‘f2018’, ‘gnu’, or ‘legacy’. The default value forstd is ‘gnu’, which specifies a superset of the latestFortran standard that includes all of the extensions supported by GNUFortran, although warnings will be given for obsolete extensions notrecommended for use in new code. The ‘legacy’ value isequivalent but without the warnings for obsolete extensions, and maybe useful for old non-standard programs. The ‘f95’,‘f2003’, ‘f2008’, and ‘f2018’ values specify strictconformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran2018 standards, respectively; errors are given for all extensionsbeyond the relevant language standard, and warnings are given for theFortran 77 features that are permitted but obsolescent in laterstandards. The deprecated option ‘-std=f2008ts’ acts as an alias for‘-std=f2018’. It is only present for backwards compatibility withearlier gfortran versions and should not be used any more.

-ftest-forall-temp

Fortran 90 Compiler Options

Enhance test coverage by forcing most forall assignments to use temporary.

Fortran 90 Compiler

Next: Preprocessing Options, Previous: Option Summary, Up: Invoking GNU Fortran [Contents][Index]