Compiler options in FORTRAN 77
Page Last modified: 27 January 1999
- There are many compiler options. Below are just a few, some
of which might be of particular interest.
-
-V
Creates a listing file of the source file with various
compile-time information appended. The name of the listing
file is the basename of the source file with a .l
substituted
for the .f, .for, or .FOR.
How you compile source files determines how the listing
file
is created. If you compile several source files together,
one
listing file is created (named with the basename of the
first
input file and the .l suffix). If you compile source
files
one at a time, a separate listing file is created for each
input file (named with the basename of the input file and
the
.l suffix).
-
-u
Makes the default type of a variable undefined (IMPLICIT
NONE), which causes the compiler to issue a warning for
any
undeclared symbols (same as the -warn declarations
option).
This behavior differs from default FORTRAN rules.
-
-warn declarations
Makes the default type of a variable undefined (IMPLICIT
NONE), which causes the compiler to issue a warning for
any
undeclared symbols. This behavior differs from default
FOR-
TRAN rules. The default is -warn nodeclarations.
-
-check bounds
Generates code to perform run-time checks on subscript and
substring expressions. An error is reported if the
expression
is outside the dimension of the array or the length of the
string. The default is -check nobounds.
-
-real_size 32
Defines REAL declarations, constants, functions, and
intrin-
sics as REAL*4, and defines COMPLEX declarations,
constants,
functions, and intrinsics as COMPLEX (COMPLEX*8). This is
the
default.
-
-real_size 64
Defines REAL declarations, constants, functions, and
intrin-
sics as DOUBLE PRECISION (REAL*8), and defines COMPLEX
declarations, constants, functions, and intrinsics as
DOUBLE
COMPLEX (COMPLEX*16). The default is -real_size 32.
-
-show include
Includes in the listing (if one is generated with -V ),
any
text file specified with INCLUDE in the source program.
The
default is -show noinclude.
-
-show nomap
Excludes from the listing (if one is generated with -V ),
information about the symbols used in the source program.
The
default is -show map.
-
-show xref
Includes in the listing (if one is generated with -V ), a
cross-reference of all symbols used in the source program,
along with line numbers of definitions and uses (same as
the
-cross_reference option). The default is -show noxref.
-
-warn argument_checking
Enables warnings about argument mismatches between caller
and
callee, when compiled together. The default is -warn
noargument_checking.
-
-warn nouncalled
Suppresses warning messages when a statement function is
never
called. The default is -warn uncalled.
-
-warn nouninitialized
Suppresses warning messages for a variable that is used
before
a value is assigned to it. The default is -warn
uninitialized.
-
-warn nounreachable
Suppresses warning messages for a section of code that is
unreachable (no path to it). The default is -warn
unreachable.
Back to
ATM 150 homepage