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