147931Sbostic.\" Copyright (c) 1991 The Regents of the University of California. 247931Sbostic.\" All rights reserved. 319132Smckusick.\" 4*50822Scael.\" This module is believed to contain source code proprietary to AT&T. 5*50822Scael.\" Use and redistribution is subject to the Berkeley Software License 6*50822Scael.\" Agreement and your Software Agreement with AT&T (Western Electric). 719132Smckusick.\" 8*50822Scael.\" %sccs.include.proprietary.roff% 947931Sbostic.\" 10*50822Scael.\" @(#)f77.1 6.10 (Berkeley) 08/08/91 1143692Scael.Dd 1243692Scael.Dt F77 1 1343692Scael.Os BSD 4 1443692Scael.Sh NAME 1543692Scael.Nm f77 1643692Scael.Nd Fortran 77 compiler 1743692Scael.Sh SYNOPSIS 1843692Scael.Nm f77 1943692Scael.Op option 20*50822Scael.Ar ... 2143692Scael.Ar file ... 2243692Scael.Sh DESCRIPTION 2343692Scael.Nm F77 24*50822Scaelis the 25*50822Scael.Ux 26*50822ScaelFortran 77 compiler. 2719132SmckusickIt accepts several types of arguments: 2843692Scael.Pp 2919132SmckusickArguments whose names end with `.f' are taken to be 3019132SmckusickFortran 77 source programs; 3119132Smckusickthey are compiled, and 3219132Smckusickeach object program is left on the file in the current directory 3319132Smckusickwhose name is that of the source with `.o' substituted 3444954Scaelfor `.f'. 3543692Scael.Pp 3619133SmckusickArguments whose names end with `.F' are also taken to be Fortran 77 source 3719133Smckusickprograms; these are first processed by the C preprocessor before being 3819133Smckusickcompiled by 3943692Scael.Nm f77 . 4043692Scael.Pp 4119133SmckusickArguments whose names end with `.r' or `.e' are taken to be Ratfor 42*50822Scaelor 43*50822Scael.Tn EFL 44*50822Scaelsource programs respectively; these are first transformed by the 4544954Scaelappropriate preprocessor, then compiled by 4644954Scael.Nm f77 . 4743692Scael.Pp 4819133SmckusickArguments whose names end with `.c' or `.s' are taken to be C or assembly 4919133Smckusicksource programs and are compiled or assembled, producing a `.o' file. 5043692Scael.Pp 5119132SmckusickThe following options have the same meaning as in 5243692Scael.Xr cc 1 . 5319132SmckusickSee 5443692Scael.Xr ld 1 5519132Smckusickfor load-time options. 56*50822Scael.Bl -tag -width Fl 57*50822Scael.It Fl c 5843692ScaelSuppress loading and produce `.o' files for each source 5919132Smckusickfile. 60*50822Scael.It Fl g 6123128SmckusickProduce additional symbol table information for 6243692Scael.Xr dbx 1 6323128Smckusickand pass the 64*50822Scael.Fl \&lg 6519132Smckusickflag to 66*50822Scael.Xr \&ld 1 6723128Smckusickso that on abnormal terminations, the memory image is written 6843692Scaelto file 6943692Scael.Pa core . 7023128SmckusickIncompatible with 7143692Scael.Fl O . 72*50822Scael.It Fl o Ns Ar output 7319133SmckusickName the final output file 7443692Scael.Ar output 7543692Scaelinstead of 7643692Scael.Sq Pa a.out . 77*50822Scael.It Fl p 7819132SmckusickPrepare object files for profiling, see 7943692Scael.Xr prof 1 . 80*50822Scael.It Fl \&pg 8119133SmckusickCauses the compiler to produce counting code in the manner of 8243692Scael.Fl p , 8319133Smckusickbut invokes a run-time recording mechanism that keeps more extensive 8419133Smckusickstatistics and produces a 8543692Scael.Pa gmon.out 8619133Smckusickfile at normal termination. An execution profile can then be generated 8719133Smckusickby use of 8843692Scael.Xr gprof 1 . 89*50822Scael.It Fl w 9019133SmckusickSuppress all warning messages. 91*50822ScaelIf the option is 92*50822Scael.Ql \-w66 , 93*50822Scaelonly Fortran 66 compatibility warnings are suppressed. 94*50822Scael.It Fl D Ns Ar name Ns =def 95*50822Scael.It Fl D Ns Ar name 9619133SmckusickDefine the 9743692Scael.Ar name 9819133Smckusickto the C preprocessor, as if by `#define'. If no definition is given, the name 9919133Smckusickis defined as "1". (`.F' suffix files only). 100*50822Scael.It Fl I Ns Ar dir 10119133Smckusick`#include' files whose names do not begin with `/' are always sought 10219133Smckusickfirst in the directory of the 10343692Scael.Ar file 10419133Smckusickargument, then in directories named in 10543692Scael.Fl I 10619133Smckusickoptions, then in directories on a standard list. (`.F' suffix files only). 107*50822Scael.It Fl O 10819132SmckusickInvoke an 10919132Smckusickobject-code optimizer. 11023128SmckusickIncompatible with 11143692Scael.Fl g . 112*50822Scael.It Fl S 11319132SmckusickCompile the named programs, and leave the 11419132Smckusickassembler-language output on corresponding files suffixed `.s'. 11519132Smckusick(No `.o' is created.). 11643692Scael.Pp 11719132SmckusickThe following options are peculiar to 11843692Scael.Nm f77 . 119*50822Scael.It Fl d 12023128SmckusickUsed for debugging the compiler. 121*50822Scael.It Fl i2 12219133SmckusickOn machines which support short integers, make the default integer constants 12319133Smckusickand variables short. 12443692Scael.Fl i4 12519133Smckusickis the standard value of this option). All logical quantities will be short. 126*50822Scael.It Fl q 12719134SmckusickSuppress printing of file names and program unit names during compilation. 128*50822Scael.It Fl m 12919133SmckusickApply the M4 preprocessor to each `.r' file before transforming 130*50822Scaelit with the Ratfor or 131*50822Scael.Tn EFL 132*50822Scaelpreprocessor. 133*50822Scael.It Fl onetrip 134*50822Scael.It Fl 1 13519132SmckusickCompile DO loops that are performed at least once if reached. 136*50822Scael(Fortran 77 DO loops are not performed 137*50822Scaelat all if the upper limit is smaller than the lower limit.) 138*50822Scael.It Fl r8 13924544SmckusickTreat all floating point variables, 14024544Smckusickconstants, functions and intrinsics 14124544Smckusickas double precision and all complex 14224544Smckusickquantities as double complex. 143*50822Scael.It Fl u 14419132SmckusickMake the default type of a variable `undefined' rather than using the default Fortran rules. 145*50822Scael.It Fl v 14619133SmckusickPrint the version number of the compiler, and the name of each pass as it 14719133Smckusickexecutes. 148*50822Scael.It Fl C 14919132SmckusickCompile code to check that subscripts are within declared array bounds. 15023128SmckusickFor multi-dimensional arrays, only the equivalent linear subscript is checked. 151*50822Scael.It Fl F 152*50822ScaelApply the C preprocessor to `.F' files, and the 153*50822Scael.Tn EFL , 154*50822Scaelor Ratfor preprocessors 15523128Smckusickto `.e' and `.r' files, put the 15619133Smckusickresult in the file with the suffix changed to `.f', but do not compile. 157*50822Scael.It Fl E Ns Ar x 15843692ScaelUse the string 15943692Scael.Ar x 16019132Smckusickas an EFL option in processing `.e' files. 161*50822Scael.It Fl R Ns Ar x 16243692ScaelUse the string 16343692Scael.Ar x 16419132Smckusickas a Ratfor option in processing `.r' files. 165*50822Scael.Sm off 166*50822Scael.It N Op Cm qxscn Ar nnn 167*50822Scael.Sm on 16819133SmckusickMake static tables in the compiler bigger. The compiler will complain 16919133Smckusickif it overflows its tables and suggest you apply one or more of these 17019133Smckusickflags. These flags have the following meanings: 171*50822Scael.Bl -tag -width Ds 172*50822Scael.It Cm q 17319133SmckusickMaximum number of equivalenced variables. Default is 150. 174*50822Scael.It Cm x 17519133SmckusickMaximum number of external names (common block names, subroutine and 17619133Smckusickfunction names). Default is 200. 177*50822Scael.It Cm s 17819133SmckusickMaximum number of statement numbers. Default is 401. 179*50822Scael.It Cm c 18019133SmckusickMaximum depth of nesting for control statements (e.g. DO loops). Default is 18119133Smckusick20. 182*50822Scael.It Ar n 18319133SmckusickMaximum number of identifiers. Default is 1009. 184*50822Scael.El 185*50822Scael.It Fl U 18619133SmckusickDo not convert upper case letters to lower case. The default is to convert 18719133SmckusickFortran programs to lower case except within character string constants. 188*50822Scael.El 18943692Scael.Pp 19019132SmckusickOther arguments 19119132Smckusickare taken 192*50822Scaelto be either loader option arguments, or 193*50822Scael.Nm F77 Ns -compatible 19419132Smckusickobject programs, typically produced by an earlier 19519132Smckusickrun, 196*50822Scaelor perhaps libraries of 197*50822Scael.Nm F77 Ns -compatible 198*50822Scaelroutines. 19919132SmckusickThese programs, together with the results of any 20019132Smckusickcompilations specified, are loaded (in the order 20119132Smckusickgiven) to produce an executable program with name 20243692Scael.Sq Pa a.out . 20343692Scael.Pp 20423128SmckusickPrograms compiled with 20543692Scael.Nm f77 20623128Smckusickproduce memory dumps in file 20743692Scael.Pa core 20823128Smckusickupon abnormal termination if the 20944954Scael.Sq Fl 21023128Smckusickflag was specified during loading. 21123128SmckusickIf the environment variable 21243692Scael.Ev f77_dump_flag 21323128Smckusickis set to a value beginning with 21444954Scael.Sq Ar y 21524544Smckusickor 21644954Scael.Sq Ar n , 21723128Smckusickdumps for abnormal terminations are respectively forced or 21823128Smckusicksuppressed. 21943692Scael.Sh FILES 220*50822Scael.Bl -tag -width /usr/lib/libI77_p.a -compact 221*50822Scael.It file.[fFresc] 222*50822ScaelInput file. 223*50822Scael.It Pa file.o 224*50822ScaelObject file. 225*50822Scael.It Pa a.out 226*50822ScaelLoaded output. 227*50822Scael.It Pa /usr/lib/f77pass1 228*50822ScaelCompiler. 229*50822Scael.It Pa /libexec/f1 230*50822ScaelPass 2. 231*50822Scael.It Pa /libexec/c2 232*50822ScaelOptional optimizer. 233*50822Scael.It Pa /usr/bin/cpp 234*50822ScaelC preprocessor. 235*50822Scael.It Pa /usr/lib/libF77.a 236*50822ScaelIntrinsic function library. 237*50822Scael.It Pa /usr/lib/libI77.a 238*50822ScaelFortran I/O library. 239*50822Scael.It Pa /usr/lib/libU77.a 240*50822Scael.Ux 241*50822Scaelinterface library. 242*50822Scael.It Pa /usr/lib/libm.a 243*50822ScaelMath library. 244*50822Scael.It Pa /usr/lib/libc.a 245*50822ScaelC library, see section 3. 246*50822Scael.It Pa /usr/lib/libF77_p.a 247*50822ScaelProfiling intrinsic function library. 248*50822Scael.It Pa /usr/lib/libI77_p.a 249*50822ScaelProfiling Fortran I/O library. 250*50822Scael.It Pa /usr/lib/libU77_p.a 251*50822ScaelProfiling 252*50822Scael.Ux 253*50822Scaelinterface library. 254*50822Scael.It Pa /usr/lib/libm_p.a 255*50822ScaelProfiling math library. 256*50822Scael.It Pa /usr/lib/libc_p.a 257*50822ScaelProfiling C library, see section 3. 258*50822Scael.It Pa mon.out 259*50822ScaelFile produced for analysis by 26043692Scael.Xr prof 1 . 261*50822Scael.It Pa gmon.out 262*50822ScaelFile produced for analysis by 26343692Scael.Xr gprof 1 . 264*50822Scael.El 26543692Scael.Sh SEE ALSO 26643692Scael.Xr fpr 1 , 26743692Scael.Xr fsplit 1 , 26843692Scael.Xr ld 1 , 26943692Scael.Xr ar 1 , 27043692Scael.Xr ranlib 1 , 27143692Scael.Xr dbx 1 , 27243692Scael.Xr intro 3f 27343692Scael.Xr efl 1 , 27443692Scael.Xr ratfor 1 , 27543692Scael.Xr struct 1 , 27643692Scael.Xr prof 1 , 27743692Scael.Xr gprof 1 , 27843692Scael.Xr cc 1 279*50822Scael.Rs 280*50822Scael.%A S. I. Feldman 281*50822Scael.%A P. J. Weinberger 282*50822Scael.%A J. Berkman 283*50822Scael.%T "A Portable Fortran 77 Compiler" 284*50822Scael.Re 285*50822Scael.Rs 286*50822Scael.%A D. L. Wasley 287*50822Scael.%A J. Berkman 288*50822Scael.%T "Introduction to the F77 IO Library" 289*50822Scael.Re 29043692Scael.Sh DIAGNOSTICS 29119132SmckusickThe diagnostics produced by 29243692Scael.Nm f77 29319132Smckusickitself are intended to be 29419132Smckusickself-explanatory. 29519132SmckusickOccasional messages may be produced by the loader. 29643692Scael.Sh HISTORY 297*50822ScaelThe 29843692Scael.Nm F77 299*50822Scaelcomplier appeared in 300*50822Scael.At v7 . 30143692Scael.Sh BUGS 30223128SmckusickFiles longer than about 50,000 lines must be split up to be compiled. 303