ftn77(1)

NAME
ftn77 - Fortran 77 driver for f2c and a C compiler

SYNOPSIS
ftn77 [options] file [-Ldir] [-lib]

DESCRIPTION
ftn77 can be used to compile Fortran 77 source code. It uses f2c(1) and gcc(1) as well as either Sun Microsystem's fpp(1) Fortran 77 preprocessor or the standard C preprocessor cpp(1). The choice of preprocessor was chosen during installation of ftn77, and it may be determined by ftn77 -V -E file.F.

ftn77 recognizes many of the options of f2c(1), and ignores those that are not applicable to compilation proper. For example, the -C++ option to produce C++ code is ignored. Depending on the preprocessor chosen, cpp(1) or fpp(1), some options are recognized and passed to the command. ftn77 does not recognize any gcc(1) options except those that may be specified to one of the other stages. For example, -v is passed to both f2c and gcc. Any option that is not recognized by ftn77 is passed through to gcc. gcc options that accept a whitespace delimited argument are not supported (e.g., -x language ).

During the linking stage, -lf2c and -lm are automatically added to the linking command. The location of libf2c.a is also added.

The input source file names must have one of the following forms: *.F, *.f, *.o, and *.a. A file ending with F is a source file that will preprocessed before translation by f2c and compilation by gcc. A file ending with f should contain Fortran 77 source code, and it will not be preprocessed. Files with a o extension are assumed to be object modules, and these will be passed to the linking stage. Files with a a extension are assumed to be libraries, and these are passed to the linking statge.

OPTIONS

-1  [f2c] Execute DO LOOPs at least one time.

-72 [f2c,fpp] Text appearing after column 72 is an error. This option implies -fixed for fpp(1).

-C  [f2c] Bounds checking on arrays.

-c  Compile but do not link.

-cd [f2c] Ignore DOUBLE COMPLEX intrinsic functions starting with cd.

-DSYM
    [cpp, fpp] Define SYM to 1 during preprocessing of Fortran code.

-DSYM=val
    [cpp, fpp] Define SYM to val during preprocessing of Fortran code.

-E  Preprocess only.

-ext
    [f2c] Complain about Fortran 77 extensions.

-f  [f2c] Accept free form source. This option implies -free for fpp(1).

-fixed
    [f2c,fpp] Text appearing after column 72 is an error. This option implies -72 for f2c(1).

-free
    [fpp] Accept free form source in the preprocessor.

-h  [f2c] Fortran 66 HOLLERITH.

-hd [f2c] Fortran 66 HOLLERITH and align on double word boundary.

-I2 [f2c] INTEGER and LOGICAL are treated as short int.

-IDIR
    [cpp, fpp] Search DIRectory for included files.

-i90
    [f2c] Do not recognize the F90 bit-manipulation intrinsics.

-kr [f2c] Use temporary variables to enforce Fortran evaluation.

-krd
    [f2c] Use DOUBLE PRECISION temporary variables.

-LDIR
    Search DIRectory for libraries.

-lLIB
    Link with LIBrary.

-macro={yes|no_com|no}
    [fpp] -macro option see fpp(1)

-o name
    Write output to name.

-onetrip
    [f2c] See -1 above.

-R  [f2c] Do not promote REAL functions to DOUBLE PRECISION.

-r  [f2c] Cast values of REAL functions to REAL.

-r8 [f2c] Promote REAL to DOUBLE PRECISION, COMPLEX to DOUBLE COMPLEX.

-T dir
    Use dir as a directory for temporary storage.

-USYM
    [cpp, fpp] Undefine SYM during preprocessing of Fortran code.

-undef
    [cpp, fpp] Undefine all previously defined symbols during preprocessing.

-w  [f2c, fpp] Suppress warnings.

-w0 [fpp] Suppress warnings from preprocessing stage.

-w66
    [f2c] Suppress FORTRAN 66 warnings.

-w8 [f2c] Suppress warnings when COMMON forces odd-word alignment.

-V  Echo the command line for each stage of compilation.

-v  [f2c, gcc] Verbose output.

-z  [f2c] No implicit double complex.

BUGS
Each stage of compilation is performed by ftn77 forking a child process. The child process can produce one or more temporary files. If the parent process is killed before a child returns, then the temporary files may not be deleted.

SEE ALSO
cpp(1), f2c(1), fpp(1), gcc(1)

AUTHOR
Steven G. Kargl, Applied Physics Laboratory, University of Washington