 |
» |
|
|
 |
The following alphabetical list describes each of the compile-line
options recognized by HP Fortran 90. The +usage
option also lists and briefly describes all of the currently supported
options. - +[no]asm
The +asm
option compiles the named programs and leaves the assembler-language
output in corresponding files whose names have the .s
extension. The assembler-language output produced by this option
is not supported as input to the assembler. The default is +noasm. The
-S option can
be used to perform the same function as +asm. - +[no]autodbl
The +autodbl
option increases the default size of integer, logical, and real
items to 8 bytes. It also increases the default size of double precision
and complex items to 16 bytes. This option does not increase the
size of the following: Items declared with the BYTE
statement Items declared with the DOUBLE COMPLEX
statement
For example, the following are unaffected by +autodbl: Note, however, that constants specified with an exponent—for
example, 4.0E0
and 2.3D0—are
doubled. Items promoted include constants, scalar variables, arrays,
components of derived types, and record fields. This option also
promotes intrinsics as well as the results and arguments of user-defined
functions to the proper precision. Types specified in ON
statements are also promoted. The entire program should be compiled with this option, not
just selected files. This
option is useful when porting programs that depend on the increased
precision of 8 and 16 bytes. If you want to promote only single-precision
items, use the +autodbl4
option. (REAL(KIND=16)
arithmetic is slow.) The default is +noautodbl. - +[no]autodbl4
Like the +autodbl
option, the +auotdbl4
option increases the default size of integer, logical, and real
items to 8 bytes, and the default size of complex items to 16 bytes.
Unlike +autodbl, it does not increase the default size of double
precision. This option does not increase the size of the following: Note, however, that constants specified with an exponent—for
example, 4.0E0
and 2.3D0—are
doubled. Items promoted include constants, scalar variables, arrays,
components of derived types, and record fields. This option also
promotes intrinsics as well as the results and arguments of user-defined
functions to the proper precision. Types specified in ON
statements are also promoted. The entire program should be compiled with this option, not
just selected files. Use this option when you want to promote only
the single-precision items. The default is +noautodbl4.  |  |  |  |  | NOTE: The +autodbl4
option causes REAL,
INTEGER, and
DOUBLE PRECISION
to be the same size. This violates the Fortran 90 Standard. |  |  |  |  |
- -c
The
-c option compiles
the specified source files but does not link them. The compiler
produces a relocatable file (.o)
for each file in the files list (these may include .f90,
.f, .F,
.i, .i90,
and .s files).
When using -c
and -o together,
you may specify only one source file on the command line; the resulting
object file is renamed. - +check={all|none}
The
+check=all option
enables compile-time range checking for array subscripts. The +check=all
option will also cause your program to halt with a range-checking
error if a numerical overflow occurs. The default is +check=none. The
-C option can
be used to perform the same function as +check=all. - +cpp={yes|no|default}
The +cpp=yes
option tells the compiler to pass the source files specified on
the command line to the C preprocessor before passing them on to
the compiler. This option does not apply to .i
and .i90 files. The default, +cpp=default,
is to apply the C preprocessor to files that end in the .F
extension but not to files that end in .f
or .f90. Specifying +cpp=no
tells the compiler not to invoke the C preprocessor for all files
on the command line, including those ending in .F. If you want to keep the output from the C preprocessor, use
the +cpp_keep
option. - +[no]cpp_keep
The +cpp_keep
option causes the compiler to retain the output from the C preprocessor.
If the source filename is file.f
or file.F,
the output filename is file.i;
if the source filename is file.f90,
the output filename is file.i90.
The compiler will accept source files with the .i
and .i90 extensions. The default, +nocpp_keep,
is to discard the output file. Note that this option does not pass source files to the C
preprocessor. To do that, you must also specify the +cpp=yes
option. - -D name[=def]
The -D
option defines a symbol name (name) to
the C preprocessor. If you do not provide a definition (def)
for the symbol name, name is defined
as 1. This option
applies only to files that are passed to the C preprocessor. - +DAmodel
The
+DA option fenerates
object code for a particular version of the PA-RISC architecture.
By default, the compiler generates code for the machine model you
are compiling on. With this option, you can override the default,
causing the compiler to generate code for the machine on which the
program will execute rather than for the machine on which it is
compiled. model can be one of the following: A PA-RISC version number (1.1
or 2.0) A model number (for example, 750
or 870) One of the PA-RISC processor names (for example,
PA7000, PA7100,
or PA8000) The word portable
to generate code that is compatible across all PA-RISC 1.1 and 2.0
systems
See
the file /usr/lib/sched.models
for model numbers and their architectures. Use the uname
command to determine the model number of your system. (For information
about the uname
command, see uname(2).) For best performance, use +DA
with the model number or architecture of the machine on which you
plan to execute the program. The +DA
option also specifies the appropriate search path for HP-UX math
libraries. If your program calls mathematical functions, +DA2.0
links in the PA2.0 version of the math library, while +DA1.1
links in the PA1.1 library version. (For more information about
using math libraries, see the HP-UX Floating-Point Guide.) - +DC7200
The +DC7200
option performs memory hierarchy optimizations for the PA7200 processor. - +[no]demand_load
The
+demand_load
option causes the output file from the linker to be marked demand load.
When a process is marked demand load,
its pages are brought into physical memory only when they are accessed.
The default, +nodemand_load,
causes the output file from the linker not to be marked demand load. The
-q option performs
the same function as +demand_load,
and the -Q option
performs the same function as +nodemand_load. - +[no]dlines
The +dlines
option treats source lines with a "D"
or "d"
in column 1 as statements to be compiled. The default, +nodlines,
treats lines beginning with "D"
or "d"
in column 1 as comments. The +dlines
option must be used only with source files in fixed-format. - +DSmodel
The +DS
option performs instruction scheduling that is tuned for a particular
implementation of the PA-RISC architecture. model can be one of the following: A PA-RISC version number (1.1
or 2.0) A model number (for example, 750
or 870) One of the PA-RISC processor names (for example,
PA7000, PA7100,
or PA8000)
For example, specifying +DS750
performs instruction scheduling tuned for one implementation of
PA-RISC 1.1. Specifying +DS2.0
or +DS1.1 performs
scheduling for a representative PA-RISC 2.0 or 1.1 system, respectively.
To improve performance on a particular model, use +DS
with that model number. See
the file /usr/lib/sched.models
for model names and numbers, as well as their architectures. Use
the uname -a
command to determine the model number of your system. (For more
information about uname,
see uname(2).) Object code with scheduling tuned for a particular model will
execute on other systems, although possibly less efficiently. If you do not specify this option, the default instruction
scheduling is for the system on which you are compiling. - +[no]escape
The +escape
option treats the backslash character (\)
as a C-like escape character. The default, +noescape,
treats the backslash character as a literal character. - +[no]extend_source
The
+extend_source
option allows extended source lines, which may contain up to 254
characters. The default, +noextend_source,
restricts fixed-format source lines to 72 characters and free-format
source lines to 132 characters.  |  |  |  |  | NOTE: Programs that rely on the compiler's ignoring
characters past column 72 will not compile correctly with the +extend_source
option. |  |  |  |  |
- +FPflags
The +FP
option initializes the flags that specify how runtime floating-point
exceptions should be trapped. flags can
be concatenated to specify a desired behavior and may not contain
spaces or tabs. Valid values for flags
are identified in Table 13-4 “ Values for the +FP
option”.  |  |  |  |  | NOTE: Enabling sudden underflow may cause the same program
file to compute different results on different implementations of
the PA-RISC 1.1 and 2.0 architectures. This is because some hardware
implementations have sudden underflow available, while others do
not. Selecting the +FP
option allows hardware to flush denormalized values to zero, but
it does not require that it do so. |  |  |  |  |
By default, all traps are disabled. However, you can specifically
disable a behavior either by excluding the upper-case letter from
flags or by including the equivalent
lower-case letter (v,z,o,u,i,d)
in flags. For example, the following
command lines are equivalent: If you are using PA1.1 libraries, you can dynamically change
these settings at run time by using the fpsetdefaults
or fpsetmask routines. For more information
about these routines, see the fpgetround(3M)
man page and the HP-UX Floating-Point Guide.
Table 13-4 Values for the +FP
option Value | Meaning |
|---|
V | Trap
on invalid floating-point operations. Examples of invalid floating-point
operations include the following: Arithmetic
operation on NaNs Operations such as (+inf) + (-inf)
and (+inf) - (+inf) Multiplication of 0 and infinity Division operations 0/0
and inf/inf Certain floating-point remainder operations Square root of a negative value Certain kinds of comparisons of unordered values
| Z | Trap
on floating-point divide by zero. | O | Trap
on floating-point overflow. | U | Trap
on floating-point underflow. | I | Trap
on floating-point operations that produce inexact results. Inexact
result traps may occur whenever roundoff is necessary to produce
the result. For example, the fraction 1.0/3.0
produces an inexact trap because there is no exact floating-point
representation for this fraction. | D | Enable
sudden underflow (flush to zero) of denormalized values on those
PA-RISC systems greater than version 1.0 that have implemented sudden
underflow. (That is, selecting D
enables sudden underflow only if it is available on the processor
that is used at run time.) Denormalized values are those values
whose absolute value is very close to zero. For IEEE single precision
data types, the largest denormalized value is approximately equal
to 2-126. For IEEE double precision data
types, such values are approximately equal to 2 -1022.
Sudden underflow will cause some floating-point applications to
run faster, with a possible loss of numerical accuracy on numbers
very close to zero. |
- +[no]fp_exception
The
+fp_exception
option causes a descriptive message and a procedure traceback to
be issued to standard error when the HP-UX signals listed in Table 13-5 “ Signals recognized by
the +fp_exception
option” are generated. By default, floating-point exceptions are disabled on Series
700/800 systems, in accordance with the IEEE standard. For a description of these signals, see signal(2)
and signal(5) in the HP-UX
Reference. For information about floating-point exceptions
and error handling, see the HP-UX Floating-Point Guide. You can also use the ON
statement to write your own trap procedures. For information about
the syntax of the ON
statement, see Chapter 10; for information about using the ON
statement, see Appendix D. The default, +nofp_exception,
disables traceback information.
Table 13-5 Signals recognized by
the +fp_exception
option Signal | Meaning |
|---|
SIGILL | Illegal
instruction | SIGFPE | Floating-point
exception | SIGBUS | Bus
error instruction | SIGSEGV | Segmentation
violation | SIGSYS | Bad argument
to system call |
- -g
The
-g option causes
the compiler to generate information for use by the HP/DDE debugger.
The -g option
can be used to prepare code for debugging that has been compiled
with optimization options -O,
-O1/+O1, and
-O2/+O2, but
not -O3/+O3 or
higher. - +[no]gprof
The
+gprof option
prepares object code files for profiling with gprof.
The default is +nogprof. gprof is
provided as part of the "HP-UX General Programming Tools"
product; see gprof(1). The
-G option can
be used to perform the same function as +gprof. - -I directory
The
-I option specifies
a directory where .mod
files and files named in the INCLUDE
line or in #include
directives may be found if their name is a relative pathname—that
is, does not begin with a slash (/).
Directories are searched in the following order: The current source directory—that
is, the directory containing the file with the INCLUDE
line or #include
directive. Directories specified by the -I
option, in the order specified The current working directory The /usr/include
directory
- +[no]implicit_none
The
+implicit_none
option forces the types of identifiers to be implicitly undefined.
This is equivalent to specifying IMPLICIT NONE
for each program unit in each file in the files
list. The source code that is to be compiled with this option may
contain other IMPLICIT
statements; the statements will be honored. The default, +noimplicit_none,
allows identifiers to be implicitly defined. - +k
The
+k option generates
code for programs that reference a very large number of shared data
items. The linker will issue a diagnostic message in the rare case
when this option is needed. By default, the compiler generates short-displacement
code sequences for programs that reference global data in shared
libraries. For nearly all programs, this is sufficient. - -L directory
For libraries named in -l
operands, look in directory before looking
in the standard places. You can specify multiple directories; each
directory must be preceded by its own
-L option. Directories
named in -L options
are searched in the specified order. This option must precede the
-l option on
the command line. - -lx
The -l
option causes the linker to search the library named by either /lib/libx.a
(or .sl) or /usr/lib/libx.a
(or .sl); the
linker searches /lib
first. The current state of the -a
linker option determines whether the archive (.a)
or shared (.sl)
version of the library is searched. - +langlvl={90|default}
The +langlvl=90
option checks for strict compliance to the Fortran 90 Standard and
issues warnings for any HP Fortran 90 extensions to the Standard.
The default, +langlvl=default,
allows extensions. - +[no]list
The
+list option
produces a source listing on standard output. The default, +nolist,
is not to produce a source listing. - +moddir=directory
The +moddir
option directs the compiler to write .mod
files to directory. If this option is
not specified, the compiler writes modules in the current directory. - +nls=lang
The
+nls option enables
16-bit Native Language Support processing in character strings and
comments for the specified language lang.
For details on Native Language Support, refer to Native
Language Support User's Guide. The
-Y option can
be used to perform the same function as +nls. - +On
The
+O option invokes
the optimizer, where n is the level of
optimization, 0 - 4. (+O4
is recognized but not supported and is provided for compatibility
with the f77
option, +O4.)
The -g option
is compatible with the +O0,
+O1, and +O2
options. Table 13-6 “ Levels of optimization” lists and describes the
different levels of optimization.
Table 13-6 Levels of optimization Level | Optimizations |
|---|
0 | Local
optimizations, including constant folding and partial evaluation
of test conditions. | 1 | Peephole
optimizations, including: Basic block
optimizations
| 2 | Optimizations
performed at level 1, plus the following: Coloring register allocation Induction variables and strength reduction Common subexpression elimination Loop invariant code motion Unused definition elimination
| 3 | Optimizations
performed at levels 1 and 2, plus the following:
Interprocedural optimizations, including
cloning and inlining Loop transformations to improve memory performance,
including fusion and interchange
| 4 | Level 4
optimizations are not currently supported by the compiler. If +O4
is specified, the compiler will issue a warning message and compile
at optimization level 3. |
- -O[n]
The
-O option invokes
the optimizer, where n is the level of
optimization, 0 - 4. (-O4
is recognized but not supported.) The default is optimization level
2. This option is provided for compatibility and is functionally
the same as the the +On
option. The only difference between the two is that the level number
is optional for the -O
option. For more information about the levels of optimization, see
the +On
option. - +O[no]info
The
+Oinfo option
causes the compiler to display informational messages about the
optimization process. The +Oinfo
option provides feedback that can help you to determine whether
the compiler optimized time-critical sections of your program. It
can be used at any level of optimization but is most useful at level
3. Currently, this option provides feedback for the following
optimizations: Cloning, the replacement of a call
to a routine by a call to a clone, which is a copy of the routine
with changes specific to that call site. Loop transformations to improve cache performance.
The default, +Onoinfo,
disables the display of informational messages about optimization. - +O[no]optimization
The
+O[no]optimization
options enable or disable specific optimizations or classes of optimizations
(for example, optimizations that affect compilation time). For detailed
information about +O[no]optimization,
see “Optimization options”. - -o outfile
The
-o option names
the executable file outfile rather than
the default name of a.out.
If not specified, a.out
will be overwritten if it exists, or created if it does not. The
outfile name must not end with .f,
.f90, .F.
.i, or .i90.
Also, it must not begin with +
or -. When using
-c and -o
together, you may specify only one source file on the command line;
the resulting object file is renamed. - +[no]onetrip
The +onetrip
option generates code that executes any DO
loop at least once. In accordance with the language standard, HP
Fortran 90 will not execute a DO
loop if either of the following conditions is true: The increment value is greater than
zero, and the initial value is greater than the limit. The increment value is less than zero, and the initial
value is less than the limit.
However,
older implementations of Fortran (for example, some FORTRAN 66 processors)
always execute a DO
loop at least once. The +onetrip
option provides compatibility with those nonstandard implementations. The default is +noonetrip. - +pic={short|long|no}
The
+pic option generates
object code that can be added to a shared library. Object code generated
with this option is position-independent code (PIC). All addresses
are either pc-relative or indirect references. The argument—short
or long—specifies
the allocated size of the data linkage table. Normally you would
specify +pic=short
to generate PIC. Use +pic=long
when the linker issues an error message indicating data linkage
table overflow. Specifying +pic=long
causes the compiler to allocate additional space for more imported
symbols. The default, +pic=no,
causes the compiler to generate absolute code. The
+z option performs
the same function as +pic=short,
and the +Z option
performs the same function as +pic=long. For additional information on PIC and shared libraries, see
Programming on HP-UX. - +[no]ppu
The +ppu
option appends underscores to external names, including subroutines,
functions, and common blocks (for example, int_sum_
rather than the default int_sum). The default is +noppu. - +pre_include=file
The
+pre_include
option causes the compiler to prepend the code in file
before any compilation occurs. This option can appear more than
once—each specifying different files—on
the same command line. - +[no]prof
The
+prof option
prepares object files for profiling with prof.
The default is +noprof. The
-p option can
be used to perform the same function as +prof. prof is
provided as part of the "HP-UX General Programming Tools"
product; see prof(1). - +real_constant={single|double}
The +real_constant=single
option treats all single-precision numerical constants as single-precision,
and the +real_constant=double
option treats all single-precision numerical constants as double-precision.
The default is +real_constant=single. The
-R4 and -R8
options can be used to perform the same function. - +[no]save
The
+save option
forces static storage for all local variables. This option provides
a convenient path for porting older Fortran programs that may depend
on static allocation of memory. (Variables in static storage retain
their values between invocations of the program units in which they
are declared). The +save
option causes all uninitialized variables to be initialized to zero.
The default is +nosave. If you explicitly declare a variable with the AUTOMATIC
attribute, the attribute overrides the +save
option. The +save
compile-line option inhibits many of the optimizations performed
by the compiler. Generally, you will get better performance with
the +Oinitcheck
option, which also sets uninitialized variables to zero but is more
selective than +save;
see “Optimization options”. The
-K option can
be used to perform the same function as +save. - +[no]shared
The +noshared
option causes the output file from the linker to be marked unshared.
The default, +shared,
is to mark the output file as shared. The
-n option performs
the same function as +shared,
and the -N option
performs the same function as +noshared. - +source={fixed|free|default}
The
+source option
tells the compiler that source files are in either fixed or free
form. The default (+source=default)
is free form for .f90
source files and fixed form for .f
and .F source
files. - +[no]strip
The +strip
option causes the output from the linker to be stripped of symbol
table information. This option is incompatible with the -g
option. The default is +nostrip. The
-s option can
be used to perform the same function as +strip. - -tx,path
The
-t option looks
in path for the subprocess identified
by x and substitutes it for the default
subprocess. x can be one or more identifiers
indicating the subprocesses. This option works in two modes: If x is
a single identifier and path ends in
with a slash (/),
path represents the directory with the
new subprocess, and the name of the subprocess is the standard name.
If path ends in a filename, it is the
name of the subprocess. If x is a set of identifiers,
path is a directory that holds the subprocesses
identified in x. The subprocesses in
path have their standard names.
Table 13-7 “ Values for the -t
option” lists the identifiers
for x, the subprocesses each indicates,
and the standard subprocess name. The following example of the -t
option tells the compiler to pass the source files to the K&R
version of the C preprocessor for preprocessing:
Table 13-7 Values for the -t
option Value | Subprocess | Standard
name |
|---|
a | Assembler | as | c | Compiler | f90com | e | Debug file | end.o | l | Linker | ld | p | C preprocessor | cpp | s | Startup
file | crt0.o,
gcrt0.o, mcrt0.o |
- +[no]ttybuf
This option controls tty buffering.
+ttybuf uses
buffered output, and +nottybuf
uses unbuffered output. The default is buffered output (+ttybuf).
The +ttybuf option
forces buffered output even on systems whose default is unbuffered
output. The +[no]ttybuf
option is recognized only when the main program is a Fortran 90
program. If the main program is written in another language, use
the TTYUNBUF
environment variable (see f90(1)). The
+nottybuf option
is incompatible with certain BSD 3F library routines. When it is
used on the same command line with the +U77
option, the compiler will warn of a potential tty buffering conflict. - -U name
This option undefines or removes
any initial definition of name in the
C preprocessor (cpp).
See the cpp(1) in the HP-UX
Reference for details. - +[no]U77
The +U77
option invokes support for the BSD 3F library, libU77,
which provides an HP Fortran 90 interface to some of the libc
system routines. To call routines in this library, you must compile
and link with +U77.
For information about these routines, see Chapter 13. If +noU77
(the default) is specified or if +U77
is not specified, the compiler treats libU77
routine names as ordinary external names with no name mapping. If
the name is not present in one of the libraries linked to, the linker
emits an error message because of an unsatisfied symbol. If the
libU77 name is
the same as a libc
name, the name might resolve to a libc
name. This situation does not cause an error at compile time, but
can produce unpredictable results. - +[no]uppercase
The
+uppercase option
uses uppercase for external names. The default, +nouppercase,
is to convert external names to lowercase. If you need to control the case of specific names, use the
$HP$ ALIAS directive,
as described in Chapter 14. - +usage
This option lists and briefly describes
all of the compile-line options currently supported by the HP Fortran
90 compiler. No compile occurs. - -v
The
-v option enables
the verbose mode, producing a step-by-step description of the compilation
process on the standard error output. - +version
The
+version option
displays compiler version information only; no compilation occurs. - -Wx,arg1,arg2,...,argN
The
-W option causes
arg1 through argN
to be handed off to subprocess x. Each
arg takes the form: -option[,value] where option is the name of an
option recognized by the subprocess and value
is a separate argument to option, where
necessary. The values that x can assume
are listed in Table 13-8 “ Values for the -W
option”. For example, the following option tells the linker to print
a trace of each input file as ld
processes it: The next example passes the -a
shared option to the linker, causing it to select shared libraries
for linking. - -w
The
-w option suppresses
warning messages. If this option is omitted, warnings are sent to
standard error.
Table 13-8 Values for the -W
option Value | Meaning |
|---|
a | Assembler | c | Compiler | l | Linker | p | C preprocessor |
|