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