Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ftn — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

10.9;ftn (fortran_compiler), revision 1.0, 3/30/92
ftn (fortran_compiler) - compile a FORTRAN program.
usage: ftn source_file [-ac | -pic]
                [-alnchk]
                [-b [pathname] | -nb]
                [-bounds_violation | -no_bounds_violation]
                [-bx pathname]
                [-cond | -ncond]
                [-config var1...varN]
                [-cpu id]
                [-db | -dbs | -dba | -ndb]
                [-dynm | -save]
                [-exp | -nexp]
                [-ff]
                [-frnd | -nfrnd]
                [-i*2 | -i*4]
                [-idir dir1...dirN]
                [-indexl | -nindexl]
                [-info [n] | -ninfo]
                [-inlib pathname]
                [-inline char]
                [-l [pathname] | -nl]
                [-l*1 | -l*2 | -l*4]
                [-mp]
                [-msgs | -nmsgs]
                [-natural | -nnatural]
                [-nclines]
                [-nfpra]
                [-opt [n]]
                [-overlap arguments]
                [-prasm | -nprasm]
                [-subchk | -nsubchk]
                [-type | -ntype]
                [-u]
                [-uc | -nuc]
                [-version]
                [-warn | -nwarn]
                [-xref | -nxref]
                [-xrs | -nxrs]
                [-zero | -nzero]



DESCRIPTION
     The FORTRAN compiler translates a FORTRAN source file into one or more
     binary object modules, which can be executed or used as input to the
     binder.  Source files may be a maximum of 32767 lines long.  For complete
     information, see the Domain FORTRAN Language Reference.

     You can typically improve run-time performance if you compile your code
     using the -cpu option with a processor-specific id.  Use an argument
     appropriate to the CPU type of the machine(s) on which you will run the
     executable file.  The argument mathchip, for example, generates optimal
     code for the DSP90, DN330, DN560, DN570, DN580, DN2500, DN3000, DN3500,
     DN4000, and DN4500 processors, and for the HP Apollo Series 400s and
     400t.  Use the cpuhelp utility to help you choose the -cpu argument best
     suited to your needs.  For information about this utility, type help
     cpuhelp.

ARGUMENTS
     source_file (required)
                    Specify the source file to be compiled.  If you specify
                    the pathname without an .ftn suffix, the compiler
                    automatically appends .ftn, and searches for that
                    filename. If not found, it searches for the pathname that
                    you typed. If not found, the compiler reports an error.

OPTIONS
     Default options are indicated by "(D)".

     -ac (D)
          Produce absolute code. This switch only applies when you generate
          680x0 code.

     -pic Produce position-independent code. The default is to produce
          absolute code.

     -alnchk
          Display messages about alignment of structures.  This option is the
          default for compilers that generate Series 10000 code.

     -b [pathname] (D)
          Generate binary file named file.bin.  If argument is omitted, binary
          file is named source_file.bin.

     -nb  Suppress binary file.

     -bounds_violation
          Specify that the program can violate array subscript boundaries
          during execution.

     -no_bounds_violation (D)
          Specify that the program does not access array elements beyond the
          declared size of the array.

     -bx pathname
          Create an object file that does not have the default .bin suffix.

     -cond
          Compile lines with D or d in column 1.

     -ncond (D)
          Ignore lines with D or d in column 1.

     -config var1...varN
          Conditional processing: compile statements associated with var1,
          var2, and so forth, via conditional compiler directives.

     -cpu id
          Generate code for a particular class of processors.  The default id
          is mathlib_sr10 if you are compiling for a 680x0-based workstation,
          and a88k if you are compiling for a Series 10000 workstation.
          Values for id are as follows:

               mathlib_sr10
                         Code for workstations with an MC68020 or
                         MC68030 microprocessor and an MC68881 or
                         MC68882 floating-point coprocessor, or with
                         an MC68040 microprocessor.

               mathlib   Code for MC68020-, MC68030-, and MC68040-
                         based workstations (425t, 433s, DN5500).
                         Code compiled with this option runs only on
                         SR10.3.  Use mathlib_sr10 if your code
                         must also run on SR10.0, SR10.1, or SR10.2.

               mathchip  Code for MC68020- or MC68030-based
               3000      workstations with an MC6888x floating-point
               580       coprocessor (400t, 400s, DN4500, DN4000,
               570       DN3500, DN3000, DN2500, DN580, DN570,
               560       DN560, DN330, DSP90).  These seven
               330       arguments are synonyms.  Use the
               90        mathchip argument; the other arguments
                         may become obsolete at a future release.

               a88k      Series 10000 code.

               FPA1      Code for DN3000, DN4000, or DN4500
                         workstations with an FPA1 floating-point
                         accelerator unit.

               FPX       Code for DN5xx workstations with an FPX
                         floating-point accelerator unit.

               PEB       Code for workstations (including DN100, DN320,
                         DN400, DN600) with a Performance Enhancement
                         Board.

               160       Code for a DSP160, DN460, or DN660 workstation.
               460       These three arguments are synonyms.
               660

               any       Series 10000 code, if you are compiling for a
                         Series 10000 workstation, or generic MC680x0
                         code, if you are compiling for a MC680x0-based
                         workstation.

               m68k      Generic MC680x0-based code.

          Using a processor-specific code generation mode can result in
          programs that run faster.  Use the cpuhelp utility to help you
          choose the -cpu argument best suited to your needs.  For information
          about this utility, type help cpuhelp.

     -db (D)
          Generate minimal debugging information.

     -dbs Generate full runtime debugging information.

     -dba Identical to -dbs except that no optimization is performed, even if
          you also specify -opt.

     -ndb Suppress all debugging information.

     -dynm (D)
          Allocate local variables on stack if possible.

     -save
          Allocate all local variables in static space.

     -exp Generate expanded code listing (implies -l).  You cannot use -exp
          and -xref on the same command line.

     -nexp (D)
          Suppress expanded code listing.

     -ff  Activate free format:  length of source lines may be up to 1024
          characters; an ampersand (&) in column 1 specifies a continuation
          line.

     -frnd
          Rounds floating-point numbers at key points during program
          execution.  Using this option may result in a loss of performance.

     -nfrnd (D)
          Optimizes execution by computing floating-point expressions in
          greater precision than that specified by the program, when the
          compiler detects an opportunity to do so.

     -i*2 2-byte integer is default integer type.

     -i*4 (D)
          4-byte integer is default integer type.

     -idir dir1...dirN
          Add pathname to the search hierarchy of directories for include file
          names.  The hierarchy applies only to file name strings which do NOT
          begin with '.', '~', or '/'.  Up to 63 -idir options may be given.
          The compiler first tries to open the include file name as given.
          Failing that, it prefixes the given include file name with the -idir
          pathnames in the same order as supplied on the command line.

     -indexl
          Disable some optimizations generated for subscript calculations, and
          cause all array indexing to use 4-byte integer arithmetic.

     -nindexl (D)
          Use all the optimizations generated for subscript calculations.

     -info [n]
          Default is n=2.  Display information messages to nth level.

     -inlib [pathname]
          Load pathname (a PIC binary file) at run time and resolve global
          references.

     -inline char
          Select specified character (char) as in-line comment designator.

     -l [pathname]
          Generate compilation listing.  If pathname is omitted, use
          source_file.lst.

     -nl (D)
          Suppress compilation listing.

     -l*1 1-byte logical is default logical type.

     -l*2 2-byte logical is default logical type.

     -l*4 4-byte logical is default logical type.

     -mp  For use with the HP Concurrent FORTRAN (HPCF) product to enable
          optimization of FORTRAN programs for parallel execution on
          multiprocessor Series 10000 workstations.  For more information,
          refer to the HP Concurrent FORTRAN User's Guide.

     -msgs (D)
          Generate final error and warning count message.

     -nmsgs
          Suppress final error and warning count message.

     -natural
          Use natural alignment for structures and array elements that do not
          have alignment attributes.

     -nnatural (D)
          Use word alignment for structures and array elements that do not
          have alignment attributes.

     -nclines
          Suppress generation of COFF line number tables.  Applies only to
          680x0 target compilers.

     -nfpra
          Suppress the reordering of operands in floating-point expressions at
          optimization level 4.

     -opt [n] (D)
          Perform global optimization. n is a single digit integer in the
          range 0 to 4, indicating the level of optimization performed.  If n
          is omitted, or if the entire option is not specified, 3 is the
          default level.  Increasing the optimization level results in faster
          execution of your program, at the expense of longer compilation
          time.  Special restrictions apply to the use of -opt 4.  See the
          Domain FORTRAN Language Reference manual for details.

     -overlap arguments
          Specify the degree of the program's conformity to ANSI FORTRAN
          storage association standard.  By default, the compiler conforms to
          the standard.  The default produces the most optimized code.

          The option takes one or more of the following arguments:

               no_dd (D) Conforms to standard.  No dummy argument that is
                         modified in its subprogram is associated with
                         another dummy argument to the same subprogram.

               exact_dd  If two dummy arguments overlap, they must have
                         the same address.

               dd        The program does not conform to the standard for
                         dummy-to-dummy associations.

               no_dc (D) Conforms to standard.  No dummy argument that is
                         modified in its subprogram is associated with a
                         variable in a common block.

               exact_dc  If a dummy argument is associated with a variable
                         in a common block, the address of the actual
                         parameter is identical to the address of the
                         variable in the common block.

               dc        The program does not conform to the standard for
                         dummy-to-common associations.


     -prasm (D)
          Use Series 10000 assembly language format for the expanded listing
          generated by -exp.  This option applies only if used with the -exp
          option and with a compiler that generates Series 10000 code.

     -nprasm
          Use an alternate assembly-language format for the expanded listing
          generated by -exp.  This option applies only if used with the -exp
          option and with a compiler that generates Series 10000 code.

     -subchk
          Perform subscript checking.

     -nsubchk (D)
          Suppress subscript checking.

     -type
          Flag all variables and functions not explicitly typed.

     -ntype  (D)
          Suppress type checking.

     -u   Turn on case sensitivity for identifiers.

     -uc  Turn on UNIX-compatibility features: appended underscore to
          subprogram and common block names; UNIX version of default
          filenames; hidden character length variable passed as 4-byte integer
          by value.

     -nuc Turn off UNIX-compatibility features.

     -version
          Display version number of compiler.

     -warn  (D)
          Display warning messages.

     -nwarn
          Suppress warning messages.

     -xref
          Generate symbol table map and cross reference (implies -l).  You can
          not use -exp and -xref on the same command line.

     -nxref (D)
          Suppress symbol table map and cross reference.

     -xrs (D)
          Save registers across a call to an external procedure or function.

     -nxrs
          Do not assume that calls to external routines have saved the
          registers.

     -zero
          Initialize static storage to zero.

     -nzero  (D)
          No implicit initialization of static storage to zero.

EXAMPLES
     If there are no errors in the source code and the compilation proceeds
     normally, the FORTRAN compiler outputs an object file and an optional
     listing file.  Unless you specify otherwise (with the -b switch), the
     object module file has the same name as the source file, except that .bin
     replaces .ftn as the suffix.  Similarly, .lst replaces .ftn in the
     listing file name.  Thus, in response to the command

          $ ftn graph_line.ftn -l

     the FORTRAN compiler reads the file graph_line.ftn and produces an object
     file named graph_line.bin and a listing file named graph_line.lst.  If
     errors occur during compilation, the compiler writes diagnostic messages
     to error output and flags the incorrect statements in the listing file.

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