1F77(1)                      General Commands Manual                     F77(1)
2
3
4

NAME

6       f77 - Fortran77 compiler
7

SYNTAX

9       f77 [ option ] ... file ...
10

DESCRIPTION

12       F77  is the UNIX Fortran77 compiler.  It accepts several types of argu‐
13       ments:
14
15       Arguments whose names end with `.f' are taken to  be  Fortran77  source
16       programs;  they  are  compiled,  and each object program is left on the
17       file in the current directory whose name is that  of  the  source  with
18       `.o' substituted for '.f'.
19
20       Arguments  whose  names end with `.r' or `.e' are taken to be Ratfor or
21       EFL source programs, respectively; these are first transformed  by  the
22       appropriate preprocessor, then compiled by f77.
23
24       In  the same way, arguments whose names end with `.c' or `.s' are taken
25       to be C or assembly source programs and are compiled or assembled, pro‐
26       ducing a `.o' file.
27
28       The following options have the same meaning as in cc(1).  See ld(1) for
29       load-time options.
30
31       -c     Suppress loading and produce `.o' files for each source file.
32
33       -p     Prepare object files for profiling, see prof(1)
34
35       -O     Invoke an object-code optimizer.
36
37       -S     Compile the named programs,  and  leave  the  assembler-language
38              output  on  corresponding files suffixed `.s'.  (No `.o' is cre‐
39              ated.).
40
41       -f     Use  a  floating  point  interpreter  (for  PDP11's  that   lack
42              11/70-style floating point).
43
44       -o output
45              Name the final output file output instead of `a.out'.
46
47       The following options are peculiar to f77:
48
49       -onetrip
50              Compile  DO  loops  that are performed at least once if reached.
51              (Fortran77 DO loops are not performed at all if the upper  limit
52              is smaller than the lower limit.)
53
54       -u     Make  the  default  type  of  a variable `undefined' rather than
55              using the default Fortran rules.
56
57       -C     Compile code to check that subscripts are within declared  array
58              bounds.
59
60       -w     Suppress  all  warning  messages.  If the option is `-w66', only
61              Fortran 66 compatibility warnings are suppressed.
62
63       -F     Apply EFL and Ratfor preprocessor to  relevant  files,  put  the
64              result  in  the file with the suffix changed to `.f', but do not
65              compile.
66
67       -m     Apply the M4 preprocessor to  each  `.r'  or  `.e'  file  before
68              transforming it with the Ratfor or EFL preprocessor.
69
70
71       -Ex    Use  the  string  x  as  an EFL option in processing `.e'
72              files.
73
74       -Rx    Use the string x as a Ratfor option  in  processing  `.r'
75              files.
76
77       -U     Do not convert upper case letters to lower case.
78
79       -I2    Make default integer size 16 bit.
80
81       -I4    Make default integer size 32 bit (default).
82
83       -v     Verbose.   Print  information  showing  what  compiler is
84              doing.
85
86       -d     Debug prints out intermediate information, leaves  tempo‐
87              rary files in /tmp and often produces a core file.
88
89       Other  arguments are taken to be either loader option arguments,
90       or F77-compatible object programs, typically produced by an ear‐
91       lier  run,  or  perhaps  libraries  of  F77-compatible routines.
92       These programs, together with the results  of  any  compilations
93       specified,  are  loaded  (in the order given) to produce an exe‐
94       cutable program with name `a.out'.
95

FILES

97       file.[fresc]        input file
98       file.o              object file
99       a.out               loaded output
100       /usr/libexec/f77pass1compiler pass 1
101       /lib/c1             compiler pass 2
102       /lib/c2             optional optimizer
103       /usr/lib/libF77.a   intrinsic function library
104       /usr/lib/libI77.a   Fortran I/O library
105       /usr/lib/libU77.a   Fortran system call library
106       /lib/libc.a         C library, see section 3
107       /temp/fortPID.[xsad SopzA]temporary files
108
109       Different versions of the compiler tools may be  used  with  the
110       following flags followed immediately (no space) by the path name
111       of the desired module:
112
113       -T1        pass1            /lib/f77pass1
114       -T2        pass2            /lib/c1
115       -Ta        assembler        /bin/as
116       -Tl        loader           /bin/ld
117       -TF        footname         /lib/crt0.o
118       -TM        macro pack       m4
119

SEE ALSO

121       S. I. Feldman, P. J. Weinberger, A Portable Fortran77 Compiler
122       cc(1), ld(1), prof(1)
123

DIAGNOSTICS

125       The diagnostics produced by f77 itself are intended to be  self-
126       explanatory.  Occasional messages may be produced by the loader.
127
128       -d     causes  the  intermediate  files  to be saves in /tmp and
129              causes the compiler to print out what it is doing.
130
131       Run-time diagnostics for the input/output library  are  as  fol‐
132       lows:
133
134       /* 100 */  "error in format"
135                                   See error message output for the location
136                                   of the error in the format. Can be caused
137                                   by more than 10 levels of nested (), or
138                                   an extremely long format statement.
139       /* 101 */  "illegal unit number"
140                                   It is illegal to close logical unit 0.
141                                   Negative unit numbers are not allowed.
142                                   The upper limit is system dependent.
143
144       /* 102 */  "formatted io not allowed"
145                                   The logical unit was opened for
146                                   unformatted I/O.
147
148       /* 103 */  "unformatted io not allowed"
149                                   The logical unit was opened for
150                                   formatted I/O.
151
152       /* 104 */  "direct io not allowed"
153                                   The logical unit was opened for sequential
154                                   access, or the logical record length was
155                                   specified as 0.
156
157       /* 105 */  "sequential io not allowed"
158                                   The logical unit was opened for direct
159                                   access I/O.
160
161       /* 106 */  "can't backspace file"
162                                   The file associated with the logical unit
163                                   can't seek. May be a device or a pipe.
164
165       /* 107 */  "off beginning of record"
166                                   The format specified a left tab off the
167                                   beginning of the record.
168
169       /* 108 */  "can't stat file"
170                                   The system can't return status information
171                                   about the file. Perhaps the directory is
172                                   unreadable.
173
174       /* 109 */  "no * after repeat count"
175                                   Repeat counts in list-directed I/O must be
176                                   followed by an * with no blank spaces.
177
178       /* 110 */  "off end of record"
179                                   A formatted write tried to go beyond the
180                                   logical end-of-record. An unformatted read
181                                   or write will also cause this.
182
183       /* 111 */  "truncation failed"
184                                   The truncation of external sequential files
185                                   on 'close', 'backspace', or 'rewind' tries
186                                   to do a copy. It failed. Perhaps the temp
187                                   file couldn't be created.
188
189       /* 112 */  "incomprehensible list input"
190                                   List input has to be just right.
191
192       /* 113 */  "out of free space"
193                                   The library dynamically creates buffers for
194                                   internal use. You ran out of memory for this.
195                                   Your program is too big!
196
197       /* 114 */  "unit not connected"
198                                   The logical unit was not open.
199
200       /* 115 */  "read unexpected character"
201                                   Certain format conversions can't tolerate
202                                   non-numeric data. Logical data must be
203                                   T or F.
204
205       /* 116 */  "blank logical input field"
206
207       /* 117 */  "'new' file exists"
208                                   You tried to open an existing file with
209                                   "status='new'".
210
211       /* 118 */  "can't find 'old' file"
212                                   You tried to open a nonexistent file
213                                   with "status='old'".
214
215       /* 119 */  "unknown system error"
216                                   Shouldn't happen, but .....
217                                   (Send me a documented example.)
218
219       /* 120 */  "requires seek ability"
220                                   Direct access requires seek ability.
221                                   Sequential unformatted I/O requires seek
222                                   ability on the file due to the special
223                                   data structure required. Tabbing left
224                                   also requires seek ability.
225
226       /* 121 */  "illegal argument"
227                                   Certain arguments to 'open', etc. will be
228                                   checked for legitimacy. Often only non-
229                                   default forms are looked for.
230
231       /* 122 */  "negative repeat count"
232
233       /* 123 */  "illegal operation for channel or device"
234

BUGS

236       The  Fortran66  subset of the language has been exercised exten‐
237       sively; the newer features have not.
238
239       Fortran style read/write routines take up 23 Kbytes of  address‐
240       ing space.
241
242       The  compiler is not intelligent enough to know when to split up
243       assemblies and loads. Occasionally this causes the loader  ld(1)
244       to produce the informative local symbol botch error message when
245       local symbols like argument names  are  defined  with  different
246       types.  Thus one must split up such offensive modules into sepa‐
247       rate compilations.
248
249       All mathematics for reals is done in double precision.
250       Integer*4 byte alignment is unlike DEC and everyone else's.
251       There is no symbolic debugger.
252
253       The optimizer should be used with caution.  It is known to occa‐
254       sionally produce incorrect code.
255

EXAMPLES

257       f77  -O  -c  myprog.f
258              creates myprog.o using C optimizer
259
260       f77  -i  -O myprog.f  another.f  anon.o  -lplot
261              compiles  .f  files,  loads  all files using separate i&d
262              space and linking in routines in the plot library.
263
264       f77 myprog.f  mine.c  >&errors
265              Compiles and loads both files putting error  output  into
266              file  called  errors.  This is the C shell (csh) version.
267              The Bourne shell (sh) version is:
268
269       f77  myprog.f  mine.c  2>errors  1>errors
270
271
272
2733rd Berkeley Distribution                                               F77(1)
Impressum