Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ f77(1) — Duplix 4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

pc(1)

prof(1)

gprof(1)

adb(1)

dbx(1)

ld(1)

ratfor(1)

m4(1)

F77(1)  —  Unix Programmer’s Manual

NAME

f77 − Fortran 77 compiler

SYNOPSIS

f77 [ options ] files

DESCRIPTION

F77 is an optimizing Fortran 77 compiler.  F77 accepts several types of arguments:

Arguments whose names end with ‘.f’ are Fortran 77 source programs; they are compiled and left in a ‘.o’ file in the working directory. 

Arguments whose names end with ‘.F’ are preprocessed with the C preprocessor before they are compiled by f77. 

Arguments whose names end with ‘.r’ are Ratfor programs; they are processed by /usr/bin/ratfor before they are compiled by f77. 

Arguments whose names end with ‘.s’ are assembly language source programs; they are assembled and left in a ‘.o’ file in the working directory. 

The ‘.o’ file is deleted if a single source file is compiled and linked. 

F77 creates ‘.s’ files for each module if the user compiles with the −S option. 

OPTIONS

F77 accepts the options listed below.  Additional options are supported by ld(1). 

−20 Generates code for a 68020 CPU. To maintain compatibility with old code, the alignment rules are not changed unless you specify -X134. This alignment forces longwords to 32 bit boundaries. 

−c Compiles to the ‘.o’ level only.  Does not link. 

−C Does not strip comments from the preprocessor output.  Must be used with the −E option. 

−Dname=def

−Dname Defines the name to the preprocessor, as if by ‘#define’.  If no definition is given, the name is defined as "1". 

−E Does not compile the program; instead, it places the output of the preprocessor in the standard output file. This is useful for debugging preprocessor macros. The integrated preprocessor cannot generate output as fast as cpp(1), so use cpp(1) for big jobs. 

−f Generates code which assumes the presence of a 68881 coprocessor.  By default many of the functions supported by the 68881 will be inline as well.  Use -Z139 if you want a transcendental call to go to the routine instead.  The −f option does not support profiling. 

−F Preprocess the ‘.r’ or ‘.F’ files given to ‘.f’, but do not compile. 

−g Generates BSD style debugger information in the assembly file, for use with a debugger such as dbx(2). 

−ga Generates a stack frame for every routine, regardless of need. 

−k Prevents the compiler from optimizing an "and" with a single bit into a BTST instruction.  (Some devices require word acess to their registers while BTST is a byte access instruction.) 

−Idir ‘#include’ files whose names do not begin with "/" are always sought first in the directory of the file argument, then in directories named in −I options, then in /usr/include. 

−m Preprocesses ratfor programs with M4. 

−o output Names the final output file output. If you use this option, f77 will leave the file ‘a.out’ undisturbed. 

−onetrip Ensures that DO loops are executed at least once. 

−O Performs various speed optimizations, such as moving constant expressions out of loops. Generally this will make your programs somewhat larger; if their performance is not loop bound, they may become slower as well. 

−O0 Disables all user accessible optimizations.  This option is useful for porting code to the ISI compilers because the generated code looks similar to PCC.  Additionally it may be useful for minimizing compilation time. 

−O2 Allows the optimizer to assume that memory locations do not change except by explicit stores.  That is, this option guarantees the optimizer that no memory locations are I/O device registers that can be changed by external hardware and that no memory locations are being shared with other processes which can change them asynchronously with respect to the current process.  Use this compile time option with extreme caution (or not at all) in device drivers, operating systems, shared memory environments, and when interrupts (or UNIX signals) are present. 

−p Generates profiling code, in a manner similar to cc(1), and links the code with routines which support prof(1).  However, −p does not support programs compiled with the −f (floating point) option. 

−pg Generates profiling code similar to −p, but link with a more comprehensive profiling mechanism which supports gprof(1).  Like the −p option, −pg does not support profiling for programs compiled with the −f (floating point) option. 

−R Makes initialized variables part of the text segment; passed on to as. 

−Rstring Pass string along to ratfor as an option. 

−S Compiles the named programs and leaves the assembler-language output on corresponding files suffixed ‘.s’. 

−u Makes all variables ‘undefined’ unless declared. 

−U Retain character case significance. By default, identifiers are converted to lower case. 

−Uname Removes any initial definition of name.

−v Turns on verbose mode.  In verbose mode, f77 prints out the arguments to each phase of compilation and linking. 

−w Suppresses warning messages. 

−Xn Where n is an integer constant, turns on option number n. There are numerous options available for such things as signed bit fields, short return types, etc.  You can find descriptions of these options in Section 8 of the UNIX Compiler Guide:  C, Pascal, FORTRAN 77. 

−Zn Turns off option number n.  You can use −Z to turn off options that are on by default.  You can also use it to turn off options you turned on with −X. 

FILES

file.[fFresc]source input file
file.oobject file
a.outloaded output
/bin/asassembler
/lib/cppC preprocessor
/usr/lib/libc.aUNIX standard I/O library
/usr/lib/libmc.aUNIX standard I/O library for the 68020/68881
/usr/lib/libc_p.aprofiling UNIX standard I/O library
/usr/lib/fcomFortran compiler
/usr/lib/gcrt0.o∗profiling startup code - IEEE floating point
/usr/lib/libF77.aFortran intrinsic function library
/usr/lib/libF77_p.aprofiling intrinsic function library
/usr/lib/libI66.aFortran I/O library for Fortran 66
/usr/lib/libI77.aFortran I/O library
/usr/lib/libI77_p.aprofiling Fortran I/O library
/usr/lib/libU77.aUNIX interface library
/usr/lib/libU77_p.aprofiling UNIX interface library
/usr/lib/libmU77.aUNIX interface library compiled for the 68020/68881
/usr/lib/libmF77.aFortran intrinsic functions for the 68020/68881
/usr/lib/libmI77.aFortran I/O library for the 68020/68881
/usr/lib/libm.a Intrinsic floating point math library
/usr/lib/libm_p.aprofiling intrinsic floating point library
/usr/lib/libmm.a68020/68881 intrinsic floating point math library
/usr/lib/libSkyF77.a Fortran intrinsic library compiled for the Sky FFP
/usr/lib/libSkyI77.aFortran I/O library compiled for the Sky FFP
/usr/lib/libSkyU77.aFortran UNIX library compiled for the Sky FFP
/usr/lib/libSkyc.aStandard I/O library compiled for Sky FFP
/usr/lib/libSkym.ainstinsic math library for Sky board
/usr/lib/Skycrt0.o∗Sky startup code.
mon.outfile produced for analysis by prof(1)
gmon.outfile produced for analysis by gprof(1)

SEE ALSO

UNIX Compiler Guide: C, Pascal, FORTRAN 77
as(1)
, cc(1), pc(1), prof(1), gprof(1), adb(1), dbx(1), ld(1), ratfor(1), m4(1)

DIAGNOSTICS

The diagnostics produced by the f77 compiler are intended to be self-explanatory and similar to those produced by the BSD f77 compiler.  Occasional messages may be produced by the assembler or loader. 
 

4th Berkeley Distribution  —  5 October 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026