manual page distributed with 4.1BSD
[unix-history] / usr / src / usr.bin / f77 / f77.vax / f77.1
CommitLineData
9382c81e
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)f77.1 4.1 (Berkeley) %G%
6.\"
7.TH F77 1 4/1/81
8.UC 4
9.SH NAME
10f77 \- Fortran 77 compiler
11.SH SYNOPSIS
12.B f77
13[ option ] ... file ...
14.SH DESCRIPTION
15.I F77
16is the UNIX Fortran 77 compiler.
17It accepts several types of arguments:
18.PP
19Arguments whose names end with `.f' are taken to be
20Fortran 77 source programs;
21they are compiled, and
22each object program is left on the file in the current directory
23whose name is that of the source with `.o' substituted
24for '.f'.
25.PP
26Arguments whose names end with `.r' or `.e' are taken to be Ratfor or EFL
27source programs, respectively; these are first transformed by the
28appropriate preprocessor, then compiled by f77.
29.PP
30In the same way,
31arguments whose names end with `.c' or `.s' are taken to be C or assembly source programs
32and are compiled or assembled, producing a `.o' file.
33.PP
34The following options have the same meaning as in
35.IR cc (1).
36See
37.IR ld (1)
38for load-time options.
39.TP
40.B \-c
41Suppress loading and produce `.o' files for each source
42file.
43.TP
44.B \-g
45Have the compiler produce additional symbol table information for
46.IR sdb (1).
47Also pass the
48.B \-lg
49flag to
50.IR ld (1).
51.TP
52.BR \-w
53Suppress all warning messages.
54If the option is `\-w66', only Fortran 66 compatibility warnings are suppressed.
55.TP
56.B \-p
57Prepare object files for profiling, see
58.IR prof (1).
59.TP
60.SM
61.TP
62.B \-O
63Invoke an
64object-code optimizer.
65.TP
66.SM
67.B \-S
68Compile the named programs, and leave the
69assembler-language output on corresponding files suffixed `.s'.
70(No `.o' is created.).
71.TP
72.BR \-o " output"
73Name the final output file
74.I output
75instead of `a.out'.
76.PP
77The following options are peculiar to
78.IR f77 .
79.TP
80.SM
81.BR \-onetrip
82Compile DO loops that are performed at least once if reached.
83(Fortran 77 DO loops are not performed at all if the upper limit is smaller than the lower limit.)
84.TP
85.BR \-u
86Make the default type of a variable `undefined' rather than using the default Fortran rules.
87.TP
88.BR \-C
89Compile code to check that subscripts are within declared array bounds.
90.TP
91.BR \-F
92Apply EFL and Ratfor preprocessor to relevant files, put the result in the file
93with the suffix changed to `.f', but do not compile.
94.TP
95.BR \-m
96Apply the M4 preprocessor to each `.r' or `.e' file before transforming
97it with the Ratfor or EFL preprocessor.
98.TP
99.TP
100.BI \-E x
101Use the string
102.I x
103as an EFL option in processing `.e' files.
104.TP
105.BI \-R x
106Use the string
107.I x
108as a Ratfor option in processing `.r' files.
109.PP
110Other arguments
111are taken
112to be either loader option arguments, or F77-compatible
113object programs, typically produced by an earlier
114run,
115or perhaps libraries of F77-compatible routines.
116These programs, together with the results of any
117compilations specified, are loaded (in the order
118given) to produce an executable program with name
119`a.out'.
120.SH FILES
121.nf
122.ta \w'/usr/lib/libF77.a 'u
123file.[fresc] input file
124file.o object file
125a.out loaded output
126./fort[pid].? temporary
127/usr/lib/f77pass1 compiler
128/lib/f1 pass 2
129/lib/c2 optional optimizer
130/usr/lib/libF77.a intrinsic function library
131/usr/lib/libI77.a Fortran I/O library
132/lib/libc.a C library, see section 3
133.fi
134.SH "SEE ALSO"
135S. I. Feldman,
136P. J. Weinberger,
137.I
138A Portable Fortran 77 Compiler
139.br
140prof(1), cc(1), ld(1), efl(1), ratfor(1)
141.SH DIAGNOSTICS
142The diagnostics produced by
143.I f77
144itself are intended to be
145self-explanatory.
146Occasional messages may be produced by the loader.
147.SH BUGS
148The Fortran 66 subset of the language has been
149exercised extensively;
150the newer features have not.