The following options control the dialect of Fortran that the compiler accepts:
This option controls whether certain Fortran 90 constructs are recognized. (Other Fortran 90 constructs might or might not be recognized depending on other options such as -fvxt, -ff90-intrinsics-enable, and the current level of support for Fortran 90.)
See Fortran 90, for more information.
The default is -fno-vxt. -fvxt specifies that the VXT Fortran interpretations for those constructs are to be chosen.
See VXT Fortran, for more information.
For example, with -fbackslash in effect, A\nB specifies three characters, with the second one being newline. With -fno-backslash, it specifies four characters, A, \, n, and B.
Note that g77 implements a fairly general form of backslash processing that is incompatible with the narrower forms supported by some other compilers. For example, 'A\003B' is a three-character string in g77 whereas other compilers that support backslash might not support the three-octal-digit form, and thus treat that string as longer than three characters.
See Backslash in Constants, for information on why -fbackslash is the default instead of -fno-backslash.
See Ugly Implicit Argument Conversion, for more information.
See Ugly Assigned Labels, for more information.
For example, DIMENSION X(1) is treated as if it had read DIMENSION X(*).
See Ugly Assumed-Size Arrays, for more information.
For example, CALL FOO(,) is treated as CALL FOO(%VAL(0), %VAL(0)). That is, two null arguments are specified by the procedure call when -fugly-comma is in force. And F = FUNC() is treated as F = FUNC(%VAL(0)).
The default behavior, -fno-ugly-comma, is to ignore a single trailing comma in an argument list. So, by default, CALL FOO(X,) is treated exactly the same as CALL FOO(X).
See Ugly Null Arguments, for more information.
COMPLEXtype other than
COMPLEX(KIND=1)—usually this is used to permit
DOUBLE COMPLEX) operands.
The -ff90 option controls the interpretation of this construct.
See Ugly Complex Part Extraction, for more information.
DATAstatements), and use of character constants to initialize numeric types and vice versa.
For example, DATA I/'F'/, CHRVAR/65/, J/4HABCD/ is disallowed by -fno-ugly-init.
See Ugly Conversion of Initializers, for more information.
LOGICALvariables and expressions as potential stand-ins for each other.
For example, automatic conversion between
LOGICAL is enabled, for many contexts, via this option.
See Ugly Integer Conversions, for more information.
DOloops are to be executed at least once each time they are reached.
ANSI FORTRAN 77 and more recent versions of the Fortran standard
specify that the body of an iterative
DO loop is not executed
if the number of iterations calculated from the parameters of the
loop is less than 1.
(For example, DO 10 I = 1, 0.)
Such a loop is called a zero-trip loop.
Prior to ANSI FORTRAN 77, many compilers implemented
such that the body of a loop would be executed at least once, even
if the iteration count was zero.
Fortran code written assuming this behavior is said to require
For example, some code written to the FORTRAN 66 standard
expects this behavior from its
DO loops, although that
standard did not specify this behavior.
The -fonetrip option specifies that the source file(s) being compiled require one-trip loops.
This option affects only those loops specified by the (iterative)
statement and by implied-
DO lists in I/O statements.
Loops specified by implied-
DO lists in
specification (non-executable) statements are not affected.
You can test for yourself whether a particular compiler treats
the prefix form as
INTEGER(KIND=1) or typeless by running the
EQUIVALENCE (I, R) R = Z'ABCD1234' J = Z'ABCD1234' IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS' IF (J .NE. I) PRINT *, 'Prefix form is INTEGER' END
Reports indicate that many compilers process this form as
INTEGER(KIND=1), though a few as typeless, and at least one
based on a command-line option specifying some kind of
Popular values for n include 72 (the standard and the default), 80 (card image), and 132 (corresponds to “extended-source” options in some popular compilers). n may be none, meaning that the entire line is meaningful and that continued character constants never have implicit spaces appended to them to fill out the line. -ffixed-line-length-0 means the same thing as -ffixed-line-length-none.
See Source Form, for more information.