F77(1) BSD F77(1)
NAME
f77 - FORTRAN 77 compiler
SYNOPSIS
f77 [ option ] ... file ...
DESCRIPTION
f77 is the Domain/OS BSD interface to the preprocessors (cpp, ratfor,
etc.), the Domain FTN compiler, and the link editor (ld). It accepts
several types of arguments and interprets them as follows.
Arguments whose names end with .f are taken to be FORTRAN 77 source
programs; f77 compiles them, and leaves each object program in the
current directory, in a file whose name is that of the source, with .o
substituted for .f.
Arguments whose names end with .F are also taken to be FORTRAN 77 source
programs. These are first processed by the C preprocessor before being
compiled by f77.
Arguments whose names end with .r are taken to be Ratfor source programs;
these are first transformed by the appropriate preprocessor, then
compiled by f77.
Arguments whose names end with .c are taken to be C source programs and
are compiled, producing a .o file.
Arguments whose names end with .e or .s (EFL or assembly source programs)
are not supported by Domain/OS BSD.
The Domain/OS BSD f77 command provides some unique options; not all
standard UNIX options are available. f77 recognizes the following as
preprocessor options: -D, -I, and -Uname. f77 recognizes the following
as link editor options: -a, -l, -o, -r, -s, -t, -u, -x, -z, -L, -M, and
-V.
OPTIONS
The following options have the same meaning as in cc(1). See ld(1) for
load-time options.
-c Suppress the linking phase of the compilation and force an
object file to be produced, even if only one program is
compiled.
-Dname=def
-Dname Define the name to the C preprocessor, as if by #define. If you
do not supply a definition, define name as 1 (.F suffix files
only). (cpp switch)
-g Produce additional debug information for dbx or dde.
-Idir Change the search path for #include files with names not
beginning with a slash (/). Look first in the directory of the
source file in which the #include directive occurs; then in
directories named in this option; and finally, in directories
on a standard list. (.F suffix files only). (cpp switch).
-o output Name the final output file output instead of a.out. If you
specify a different name, the system leaves any existing a.out
files undisturbed.
-O Produce optimized code.
-p Arrange for the compiler to produce code which counts the
number of times each routine is called. If loading takes
place, replace the standard startup routine by one which
automatically calls monitor(1) at the start and arranges to
write out a mon.out file at normal termination of execution of
the object program. An execution profile can then be generated
by use of prof(1).
-pg Causes the compiler to produce counting code in the manner of
-p, but invokes a run-time recording mechanism that keeps more
extensive statistics and produces a gmon.out file at normal
termination. An execution profile can then be generated by use
of gprof(1).
-w Suppress all warning messages
-Wc,arg1,[arg2...]
Hand off the arguments argi to pass c where c is one of p, 0,
or l, indicating the preprocessor, compiler or the linker.
NOTE: You can use the -W option to access /com/ftn options
that are otherwise not available with the f77 command.
The following options are peculiar to f77.
-C Compile code to check that subscripts are within declared array
bounds. For multidimensional arrays, check only the equivalent
linear subscript.
-F Apply the C preprocessor to .F files, apply the Ratfor
preprocessors to .r files; put the result in the file with the
suffix changed to .f, but do not compile.
-i2 Make the default integer constants and variables short (2
bytes). The default -i4 tells the compiler to make all
integers four bytes.
-m Apply the M4 macro preprocessor to each .r (Ratfor) source file
before transforming it with the Ratfor preprocessor.
-q Suppress printing of filenames and program-unit names during
compilation.
-Rx Use the string x as a Ratfor option in processing .r files.
-v Print the version number of the compiler, and the name of each
pass as it executes.
The following options are not supported in the Domain/OS BSD version of
f77: -d, -lg, -S, -onetrip, -1, -r8, -u, -Ex, -N, and -U.
Other arguments are taken to be loader option arguments, or f77-
compatible object programs, typically produced by an earlier run; or
libraries of f77-compatible routines. These programs, together with the
results of any compilations specified, are loaded (in the order given) to
produce an executable program with the name a.out.
FILES
file.[fFrc] Input file
file.o Object file
a.out Loaded output
./fort[pid].? Temporary
/usr/lib/cpp C preprocessor
/usr/apollo/lib/ftn Compiler
/usr/lib/libF77.a Intrinsic function library
/usr/lib/libI77.a FORTRAN I/O library
/usr/lib/libU77.a UNIX interface library
mon.out File produced for analysis by prof(1)
gmon.out File produced for analysis by gprof(1)
The following files are not supported.
/usr/lib/f77pass1 Compiler
/lib/f1 Pass 2
/lib/c2 Optional optimizer
/usr/lib/libF77_p.a Profiling intrinsic function library
/usr/lib/libI77_p.a Profiling FORTRAN I/O library
/usr/lib/libU77_p.a Profiling UNIX interface library
DIAGNOSTICS
The diagnostics produced by f77 itself are intended to be self-
explanatory. The loader may produce occasional messages.
NOTES
After processing .F files, the C preprocessor leaves the resulting file
in the current directory, in a file whose name is that of the source,
with .f substituted for .F. If there is a previously existing .f file of
the same name; it will be overwritten.
SEE ALSO
ratfor(1), fpr(1), fsplit(1), ld(1), ar(1), dbx(1), struct(1), prof(1),
gprof(1), cc(1), intro(3f);
the Domain FORTRAN Language Reference.