Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fc(1) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

asa(1)

cc(1)

ld(1)

strip(1)

FC(1)

NAME

fc, f77 − FORTRAN 77 compiler

SYNOPSIS

fc [ options ] files
f77 [ options ] files

HP-UX COMPATIBILITY

Level: HP-UX/STANDARD

Origin: HP

Native Language Support:
8−bit strings and comments.

Remarks: This manual page describes the FORTRAN 77 compiler as implemented on both the Series 200 and Series 500 computers.  On both machines it is invoked as f77 or fc. 

DESCRIPTION

Fc is the HP-UX FORTRAN 77 compiler.  It accepts several types of file arguments:

(1) Arguments whose names end with .f are taken to be FORTRAN 77 source files.  They are compiled, and each object file is left in the current directory in a file whose name is that of the source, with .o substituted for .f.  (The .o file will not be created for a single source which is compiled and loaded, nor for any source which fails to compile correctly.)  Series 200 Only: In the same way, arguments whose names end with .c or .s are taken to be C or assembly source programs and are compiled or assembled, producing .o files. 

(2) Series 200 Only: Arguments whose names end with .r are taken to be ratfor(1) source programs.  These are first transformed by the ratfor preprocessor, and then compiled by f77 producing .o files. 

(3) Arguments whose names end with .o are passed on to the linker (ld(1)) to be linked into the final program. 

Arguments can be passed to the compiler through the FCOPTS environment variable as well as on the command line.  The compiler picks up the value of FCOPTS and places its contents before any arguments on the command line.  For example,

FCOPTS=-v
export FCOPTS
fc -L prog.f

is equivalent to

fc -v -L prog.f

The following options are recognized:

−c suppress linking and produce object (.o) files from source files. 

−C enable range checking (same as $OPTION RANGE ON). 

−D compile debug lines (source lines with a "D" or "d" in column 1 are treated as comments by default). 

−g causes the compiler to generate additional information needed for the use of a symbolic debugger.  (This option may be incompatible with optimization.) 

−I2 make default size of integers and logicals INTEGER*2 and LOGICAL*2 (same as $OPTION SHORT). 

−I4 make default size of integers and logicals INTEGER*4 and LOGICAL*4.  This is the compiler’s default. 

−K automatically SAVE all local variables in all subprograms.  This option forces static storage for these variables in order to provide a convenient path for importing FORTRAN 66 and FORTRAN 77 programs which were written to depend on static allocation of memory (i.e. variables retaining their values between invocations of the respective program units). 

−lx causes the linker to search the library named by either /lib/libx.a (tried first) or /usr/lib/libx.a.  (See ld(1).) 

−L write a program listing to stdout during compilation. 

−n causes the output file from the linker to be marked shared. 

−N causes the output file from the linker to not be marked shared. 

−o outfile name the output file from the linker outfile instead of a.out. 

−onetrip execute any DO loop at least once. 

−O invoke the assembly code optimizer. 

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

−q causes the output file from the linker to be marked demand load. 

−Q causes the output file from the linker to not be marked demand load. 

−s causes the output of the linker to be stripped of symbol table information (see ld(1) and strip(1)).  (This option is incompatible with symbolic debugging.) 

−S compile the named source files and leave the assembly language output in corresponding files whose names are suffixed with .s (no .o files are created). 

−t c,name substitute or insert subprocess c with name where c is one or more of an implementation-dependent set of identifiers indicating the subprocess(es).  Works in two modes: 1) if c is a single identifier, name represents the full path name of the new subprocess; 2) if c is a set of identifiers, name represents a prefix to which the standard suffixes are concatenated to construct the full path names of the new subprocesses.  For the Series 200, c can take one or more of the values:

r ratfor preprocessor (standard suffix is ratfor)

c compiler body (standard suffix is f77pass1)

0 same as c

1 compiler code generator (suffix is f1)

2 optimizer (standard suffix is c2)

a assembler (standard suffix is as)

l linker (standard suffix is ld)

  For the Series 500, c can take one or more of the values:

c compiler body (standard suffix is f77comp)

0 same as c

l linker (standard suffix is ld)

−u force types of identifiers to be implicitly undeclared (same as specifying IMPLICIT NONE; no other IMPLICIT statements are permitted). 

−U use upper case for external names (default is lower case). 

−v enable the verbose mode, producing a step-by-step description of the compilation process on stderr. 

−w suppress warning messages (same as $OPTION WARNINGS OFF). 

−w66 suppress warnings about FORTRAN 66 features used. 

−W c,arg1[,arg2,...,argN]
causes arg1 through argN to be handed off to subprocess c.  The argi are of the form -argoption[,argvalue], where argoption is the name of an option recognized by the subprocess and argvalue is a separate argument to argoption where necessary.  The values that c can assume are those listed under the −t option, as well as d (driver program) which has a special meaning explained below. 

−Y enable 8− and 16−bit NLS support in strings and comments.  In the default case, NLS is not enabled. 

The −W d option specification allows additional, implementation-specific options to be recognized and passed through the compiler driver to the appropriate subprocesses (see −W above).  For example, on the Series 500,

-W d,-Q,dfile,-e

will send the options −Q dfile and −e through the compiler driver.  Furthermore, a shorthand notation for this mechanism can be used by prepending + to the option name; as in

+Q dfile +e

which is equivalent to the previous option expression.  Note that for simplicity this shorthand is applied to each implementation-specific option individually, and that the argvalue is no longer separated from the argoption by a comma (see −W). 

The implementation-specific options on the Series 200 are:

+b causes the compiler to generate code for floating point operations that will use floating point hardware if it is installed in the computer at run-time. 

+f causes the compiler to generate code for floating point operations that will use floating point hardware.  This code does not run unless floating point hardware is installed. 

+k this option forces dynamic storage for local arrays.  If specified, arrays are subject to the 32K byte limitation for local data space. 

+N<secondary><n>
This option adjusts the size of internal compiler tables. The compiler uses fixed size arrays for certain internal tables. Secondary is one of the letters from the set {qsxcnaet}, and n is an integer value.  Secondary and n are not optional.  The table sizes can be re-specified using one of the secondary letters and the number n as follows:

q maximum size of equivalence table (default = 150 table entries). 

s maximum size of statement label table (default = 201 table entries). 

x maximum size of external symbol table (default = 200 table entries). 

c maximum size of control statements table (default = 20 table entries). 

n maximum size of the hash table of symbols (default = 401 table entries). 

a maximum size of external label name storage table (default = 10000 bytes). 

e maximum number of expression tree nodes (default = 1000 entries). 

t maximum size of external symbol storage table (default = 40000 bytes). 

+s issue warnings for non-ANSI features (same as $OPTION ANSI ON). 

+U upper and lower case are distinguished (case is significant).  Keywords are only recognized in lower case. 

The implementation-specific options on the Series 500 are:

+e write errors to stderr. 

+F causes the compiler to generate information used by various program analysis programs. 

+Q dfile specify dfile as the option file. 

+s issue warnings for non-ANSI features (same as $OPTION ANSI ON). 

+T causes the running program to issue a procedure traceback for runtime errors. 

+Vc put all COMMONs in the virtual data area. 

+Vd put all SAVE’d and initialized (DATA statement) variables in the virtual data area. 

+Vf put all FORMAT strings in the virtual data area. 

Any other options encountered will generate a warning to stderr. 

HARDWARE DEPENDENCIES

Series 200:
The following options are not implemented:
     −D, -L, -U

Series 500:
The following options are not implemented:
     −O, -p, -S, -w66

FILES

Series 200:

file.r input file (ratfor source file)

file.f input file (FORTRAN source file)

file.s input file (assembly source file)

file.c input file (C source file)

file.o object file

a.out linked executable output file

/usr/bin/f77 mother program (linked to /usr/bin/fc)

/usr/lib/f77pass1 compiler pass 1

/lib/f1 compiler pass 2

/lib/c2 assembly code optimizer

/usr/lib/libF77.a intrinsic function library

/usr/lib/libI77.a FORTRAN I/O library

/lib/libc.a C library; See Section 3 of this manual

/lib/libm.a math library

/lib/frt0.o run-time startoff routine

/lib/mfrt0.o startoff with profiling

/usr/lib/end.o symbolic debugger string buffer

Series 500:

file.f input file (FORTRAN source file)

file.o object file

a.out linked executable output file

/bin/fc mother program

/usr/lib/f77comp compiler

/lib/frt0.o runtime startup

/usr/lib/end.o symbolic debugger string buffer

/lib/libI77.a FORTRAN I/O library

/lib/libF77.a FORTRAN math library

/lib/libc.a C library; See Section 3 of this manual

/lib/libm.a math library

/usr/tmp/∗ temporary files used by the compiler; names are created by tmpnam(3S). 

SEE ALSO

as(1), asa(1), cc(1), ld(1), strip(1). 

FORTRAN 77 programming and reference manuals for your HP-UX system and
Structured FORTRAN 77 by Seymour Pollack. 

DIAGNOSTICS

The diagnostics produced by fc are intended to be self-explanatory.  If a listing is requested (−L option), errors are written to the listing file.  If no listing is being generated, errors are written to stderr.  Series 500 Only: Errors will be written to both the listing file and stderr if the −L and +e options are both specified.  Occasional messages may be produced by the linker. 

BUGS

The −s option has a new meaning; use +s for non-ANSI warnings. 
Series 200:  The −U option has a new meaning; use +U for case sensitivity. 
Series 500: The −Q dfile option has a new meaning; use +Q dfile to specify an option file. 
 
 
 

Hewlett-Packard  —  last mod. May 11, 2021

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