xref: /original-bsd/usr.bin/f77/f77.vax/f77.1 (revision 909c03fb)
1.\" Copyright (c) 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This module is believed to contain source code proprietary to AT&T.
5.\" Use and redistribution is subject to the Berkeley Software License
6.\" Agreement and your Software Agreement with AT&T (Western Electric).
7.\"
8.\" %sccs.include.proprietary.roff%
9.\"
10.\"	@(#)f77.1	6.10 (Berkeley) 08/08/91
11.Dd
12.Dt F77 1
13.Os BSD 4
14.Sh NAME
15.Nm f77
16.Nd Fortran 77 compiler
17.Sh SYNOPSIS
18.Nm f77
19.Op option
20.Ar ...
21.Ar file ...
22.Sh DESCRIPTION
23.Nm F77
24is the
25.Ux
26Fortran 77 compiler.
27It accepts several types of arguments:
28.Pp
29Arguments whose names end with `.f' are taken to be
30Fortran 77 source programs;
31they are compiled, and
32each object program is left on the file in the current directory
33whose name is that of the source with `.o' substituted
34for `.f'.
35.Pp
36Arguments whose names end with `.F' are also taken to be Fortran 77 source
37programs; these are first processed by the C preprocessor before being
38compiled by
39.Nm f77 .
40.Pp
41Arguments whose names end with `.r' or `.e' are taken to be Ratfor
42or
43.Tn EFL
44source programs respectively; these are first transformed by the
45appropriate preprocessor, then compiled by
46.Nm f77 .
47.Pp
48Arguments whose names end with `.c' or `.s' are taken to be C or assembly
49source programs and are compiled or assembled, producing a `.o' file.
50.Pp
51The following options have the same meaning as in
52.Xr cc  1  .
53See
54.Xr ld  1
55for load-time options.
56.Bl -tag -width Fl
57.It Fl c
58Suppress loading and produce `.o' files for each source
59file.
60.It Fl g
61Produce additional symbol table information for
62.Xr dbx  1
63and pass the
64.Fl \&lg
65flag to
66.Xr \&ld  1
67so that on abnormal terminations, the memory image is written
68to file
69.Pa core  .
70Incompatible with
71.Fl O  .
72.It Fl o Ns Ar output
73Name the final output file
74.Ar output
75instead of
76.Sq Pa a.out .
77.It Fl p
78Prepare object files for profiling, see
79.Xr prof  1  .
80.It Fl \&pg
81Causes the compiler to produce counting code in the manner of
82.Fl p ,
83but invokes a run-time recording mechanism that keeps more extensive
84statistics and produces a
85.Pa gmon.out
86file at normal termination. An execution profile can then be generated
87by use of
88.Xr gprof  1  .
89.It Fl w
90Suppress all warning messages.
91If the option is
92.Ql \-w66 ,
93only Fortran 66 compatibility warnings are suppressed.
94.It Fl D Ns Ar name Ns =def
95.It Fl D Ns Ar name
96Define the
97.Ar name
98to the C preprocessor, as if by `#define'. If no definition is given, the name
99is defined as "1". (`.F' suffix files only).
100.It Fl I Ns Ar dir
101`#include' files whose names do not begin with `/' are always sought
102first in the directory of the
103.Ar file
104argument, then in directories named in
105.Fl I
106options, then in directories on a standard list. (`.F' suffix files only).
107.It Fl O
108Invoke an
109object-code optimizer.
110Incompatible with
111.Fl g  .
112.It Fl S
113Compile the named programs, and leave the
114assembler-language output on corresponding files suffixed `.s'.
115(No `.o' is created.).
116.Pp
117The following options are peculiar to
118.Nm f77  .
119.It Fl d
120Used for debugging the compiler.
121.It Fl i2
122On machines which support short integers, make the default integer constants
123and variables short.
124.Fl i4
125is the standard value of this option). All logical quantities will be short.
126.It Fl q
127Suppress printing of file names and program unit names during compilation.
128.It Fl m
129Apply the M4 preprocessor to each `.r' file before transforming
130it with the Ratfor or
131.Tn EFL
132preprocessor.
133.It Fl onetrip
134.It Fl 1
135Compile DO loops that are performed at least once if reached.
136(Fortran 77 DO loops are not performed
137at all if the upper limit is smaller than the lower limit.)
138.It Fl r8
139Treat all floating point variables,
140constants, functions and intrinsics
141as double precision and all complex
142quantities as double complex.
143.It Fl u
144Make the default type of a variable `undefined' rather than using the default Fortran rules.
145.It Fl v
146Print the version number of the compiler, and the name of each pass as it
147executes.
148.It Fl C
149Compile code to check that subscripts are within declared array bounds.
150For multi-dimensional arrays, only the equivalent linear subscript is checked.
151.It Fl F
152Apply the C preprocessor to `.F' files, and the
153.Tn EFL ,
154or Ratfor preprocessors
155to `.e' and `.r' files, put the
156result in the file with the suffix changed to `.f', but do not compile.
157.It Fl E Ns Ar x
158Use the string
159.Ar x
160as an EFL option in processing `.e' files.
161.It Fl R Ns Ar x
162Use the string
163.Ar x
164as a Ratfor option in processing `.r' files.
165.Sm off
166.It N Op Cm qxscn Ar nnn
167.Sm on
168Make static tables in the compiler bigger. The compiler will complain
169if it overflows its tables and suggest you apply one or more of these
170flags. These flags have the following meanings:
171.Bl -tag -width Ds
172.It Cm q
173Maximum number of equivalenced variables. Default is 150.
174.It Cm x
175Maximum number of external names (common block names, subroutine and
176function names). Default is 200.
177.It Cm s
178Maximum number of statement numbers. Default is 401.
179.It Cm c
180Maximum depth of nesting for control statements (e.g. DO loops). Default is
18120.
182.It Ar n
183Maximum number of identifiers. Default is 1009.
184.El
185.It Fl U
186Do not convert upper case letters to lower case. The default is to convert
187Fortran programs to lower case except within character string constants.
188.El
189.Pp
190Other arguments
191are taken
192to be either loader option arguments, or
193.Nm F77 Ns -compatible
194object programs, typically produced by an earlier
195run,
196or perhaps libraries of
197.Nm F77 Ns -compatible
198routines.
199These programs, together with the results of any
200compilations specified, are loaded (in the order
201given) to produce an executable program with name
202.Sq Pa a.out .
203.Pp
204Programs compiled with
205.Nm f77
206produce memory dumps in file
207.Pa core
208upon abnormal termination if the
209.Sq Fl
210flag was specified during loading.
211If the environment variable
212.Ev f77_dump_flag
213is set to a value beginning with
214.Sq Ar y
215or
216.Sq Ar n  ,
217dumps for abnormal terminations are respectively forced or
218suppressed.
219.Sh FILES
220.Bl -tag -width /usr/lib/libI77_p.a -compact
221.It file.[fFresc]
222Input file.
223.It Pa file.o
224Object file.
225.It Pa a.out
226Loaded output.
227.It Pa /usr/lib/f77pass1
228Compiler.
229.It Pa /libexec/f1
230Pass 2.
231.It Pa /libexec/c2
232Optional optimizer.
233.It Pa /usr/bin/cpp
234C preprocessor.
235.It Pa /usr/lib/libF77.a
236Intrinsic function library.
237.It Pa /usr/lib/libI77.a
238Fortran I/O library.
239.It Pa /usr/lib/libU77.a
240.Ux
241interface library.
242.It Pa /usr/lib/libm.a
243Math library.
244.It Pa /usr/lib/libc.a
245C library, see section 3.
246.It Pa /usr/lib/libF77_p.a
247Profiling intrinsic function library.
248.It Pa /usr/lib/libI77_p.a
249Profiling Fortran I/O library.
250.It Pa /usr/lib/libU77_p.a
251Profiling
252.Ux
253interface library.
254.It Pa /usr/lib/libm_p.a
255Profiling math library.
256.It Pa /usr/lib/libc_p.a
257Profiling C library, see section 3.
258.It Pa mon.out
259File produced for analysis by
260.Xr prof 1 .
261.It Pa gmon.out
262File produced for analysis by
263.Xr gprof 1 .
264.El
265.Sh SEE ALSO
266.Xr fpr 1 ,
267.Xr fsplit 1 ,
268.Xr ld 1 ,
269.Xr ar 1 ,
270.Xr ranlib 1 ,
271.Xr dbx 1 ,
272.Xr intro 3f
273.Xr efl 1 ,
274.Xr ratfor 1 ,
275.Xr struct 1 ,
276.Xr prof 1 ,
277.Xr gprof 1 ,
278.Xr cc 1
279.Rs
280.%A S. I. Feldman
281.%A P. J. Weinberger
282.%A J. Berkman
283.%T "A Portable Fortran 77 Compiler"
284.Re
285.Rs
286.%A D. L. Wasley
287.%A J. Berkman
288.%T "Introduction to the F77 IO Library"
289.Re
290.Sh DIAGNOSTICS
291The diagnostics produced by
292.Nm f77
293itself are intended to be
294self-explanatory.
295Occasional messages may be produced by the loader.
296.Sh HISTORY
297The
298.Nm F77
299complier appeared in
300.At v7 .
301.Sh BUGS
302Files longer than about 50,000 lines must be split up to be compiled.
303