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