Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hf77(1) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

efl(1)

gprof(1)

ld(1)

prof(1)

ratfor(1)

HF77(1)  —  

NAME

hf77 − Optimizing FORTRAN 77 compiler

SYNOPSIS

hf77 [ option... ] filename... 

DESCRIPTION

The hf77 command invokes an optimizing FORTRAN 77 compiler.  It accepts arguments with names ending in:

• .f, which are taken to be FORTRAN 77 source programs.  They are compiled and each object program is stored in the current directory with the name of the source, but with .o substituted for .f. 

• .F, which are taken to be FORTRAN 77 source programs. They are processed by the C preprocessor before being compiled by hf77.

• .r or .e, which are taken to be Ratfor or EFL source programs respectively. They are transformed by the appropriate preprocessor before being compiled by hf77.

• .c or .s, which are taken to be C or assembly source programs respectively.  They are compiled or assembled, producing a .o file. 

The following options are interpreted by hf77(1). (The c, g, o, p, pg, w, D, I, O, and S options have the same meaning as they do in the cc(1) command.) See ld(1) for load-time options.

−a Generate extended addressing for static data.  Default compilation assumes 16-bit addressing can be used.  If as(1) reports failure, hf77 recompiles automatically with -a.  Use -a explicitly to avoid the extra compilation cycle. 

−c Suppress loading and produce .o files for each source file. 

−f2 Generate direct AFPA (Advanced Floating Point Accelerator) instructions, rather than hardware-independent rtf1, for floating point operations.  Performance is increased but the code will run only with an AFPA. 

−g Produce the additional symbol table information for dbx(1). Also pass the −lg flag to ld(1).

−i2 Make the default integer constants and variables short on machines that support short integers.  ( −i4 is the standard value of this option).  All logical quantities will be short. 

−m Apply the M4 preprocessor to each .r file before transforming it with the Ratfor or EFL preprocessor. 

−o output
Name the final output file output instead of a.out. 

−onetrip
Compile DO loops that are performed at least once if reached. (FORTRAN 77 DO loops are not performed at all if the upper limit is smaller than the lower limit.)

−p Prepare object files for profiling, see prof(1).

−pg Produce counting code in the manner of −p, but invoke a run-time recording mechanism that keeps more extensive statistics and produces a gmon.out file at normal termination. An execution profile can then be generated by use of gprof(1).

−save
Give local variables static lifetimes.  Hf77 -O invalidates local variables between function invocations, which agrees with the F77 standard but invalidates programs that rely on pre-F77 behavior. -save has the same effect as declaring each local variable with the SAVE keyword. 

−u Make the default type of variables “undefined” rather than using the default FORTRAN rules. 

−v Print the version number of the compiler, and the name of each pass as it executes. 

−w[66]
Suppress all warning messages. If the option is “−w66”, only FORTRAN 66 compatibility warnings are suppressed.

−C Compile code to check that subscripts are within declared array bounds. 

−Dname[=def]
Define the name to the C preprocessor, as if by “#define”. If no definition is given, the name is defined as 1. ( .F suffix files only). 

−Ex Use the string x as an EFL option in processing .e files. 

−F Apply the C, EFL, or Ratfor preprocessors to relevant files, put the result in the file with the suffix changed to .f, but do not compile. 

−Idir Seek “#include” files with names not beginning in “/” in the directory of the file argument first, then in directories named with −I options, then in directories on a standard list. ( .F suffix files only). 

−N[qxscnlpt]nnn
Make the compiler static tables larger. The compiler will complain if it overflows its tables and suggest you apply one or more of these flags. These flags mean:

q Maximum number of equivalenced variables. Default is 150. 

x Maximum number of external names (common block names, subroutine and function names). Default is 200. 

s Maximum number of statement numbers. Default is 401. 

c Maximum depth of nesting for control statements (e.g. DO loops). Default is 20. 

n Maximum number of identifiers. Default is 1009. 

l Maximum number of labels. 

p Pass 2 npool limit. 

t Pass 2 ntrnode limit. 

−O Invoke all optimizations. 

−Rx Use the string x as a Ratfor option in processing .r files. 

−S Compile the named programs, and leave the assembler-language output on corresponding files suffixed .s.  (No .o is created.). 

−U Do not convert upper case letters to lower case. The default is to convert FORTRAN programs to lower case except within character string constants. 

Other arguments are taken to be loader option arguments, hf77-compatible object programs produced by an earlier run, or libraries of hf77-compatible routines.  These programs, together with the results of any compilations specified, are loaded (in the order given) to produce an executable program with name a.out. 

OPTIMIZATION LEVELS

"-O" enables three levels of optimization: the HCR portable optimizer, a peephole optimizer, and inlining (replacing a function call by a copy of the function body). 

FILES

file.[fFresc]input file
file.oobject file
a.outloaded output
/tmptemporary
/usr/lib/hf77pass1compiler pass 1
/usr/lib/hf77pass2compiler pass 2
/usr/lib/hf77passqintermediate optimizer
/usr/lib/hf77coptassembly optimizer
/lib/cppC preprocessor
/usr/lib/libF77.aintrinsic function library
/usr/lib/libI77.aFORTRAN I/O library
/usr/lib/libU77.ainterface library
/usr/lib/libF77_p.aprofiling intrinsic function library
/usr/lib/libI77_p.aprofiling FORTRAN I/O library
/usr/lib/libU77_p.aprofiling interface library
/lib/libc.aC library, see Section 3
/lib/libc_p.aprofiling C library
mon.outfile produced for analysis by prof(1).
gmon.outfile produced for analysis by gprof(1).

SEE ALSO

S. I. Feldman, P. J. Weinberger, A Portable FORTRAN 77 Compiler
D. L. Wasley, Introduction to the f77 I/O Library
f77(1)
, cc(1), efl(1), gprof(1), ld(1), prof(1), ratfor(1), bf77

DIAGNOSTICS

The diagnostics produced by hf77 should be self-explanatory.  Occasional messages may be produced by the loader. 

BUGS

There is no support for setting or interrogating IEEE rounding and exception modes or exception flags. 

PRPQs 5799-WZQ/5799-PFF: IBM/4.3  —  Sept 1988

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