Previous | Contents | Index |
The following FORTRAN command examines HP Fortran fixed-form source file (ABC.FOR) without creating an object file:
$ FORTRAN /NOOBJECT ABC.FOR |
The source file ABC.FOR is compiled, syntax checking occurs, but no
object file is produced. The /NOOBJECT qualifier performs full
compilation checking without creating an object file.
2.2.6.3 Requesting a Listing File and Contents
The following FORTRAN command compiles HP Fortran free-form source file (XYZ.F90) and requests a listing file:
$ FORTRAN /LIST /SHOW=INCLUDE /MACHINE_CODE XYZ.F90 |
The source file XYZ.F90 is compiled, and the listing file XYZ.LIS and object file XYZ.OBJ are created. The listing file contains the optional included source files (/SHOW=INCLUDE) and machine code representation (/MACHINE_CODE).
The default is /NOLIST for interactive use and /LIST for batch use, so
consider explicitly specifying either /LIST or /NOLIST.
2.2.6.4 Compiling Multiple Files
The following FORTRAN command compiles the HP Fortran free-form source files (AAA.F90, BBB.F90, and CCC.F90) into separate object files:
$ FORTRAN/LIST AAA.F90, BBB.F90, CCC.F90 |
Source files AAA.F90, BBB.F90, and CCC.F90 are compiled as separate files, producing:
The default level of optimization is used (/OPTIMIZE=LEVEL=4), but interprocedure optimizations are less effective because the source files are compiled separately.
The following FORTRAN command compiles the HP Fortran fixed-form source files XXX.FOR, YYY.FOR, and ZZZ.FOR into a single object file named XXX.OBJ:
$ FORTRAN XXX.FOR+YYY.FOR+ZZZ.FOR |
Source files XXX.FOR, YYY.FOR, and ZZZ.FOR are concatenated and compiled as one file, producing an object file named XXX.OBJ. The default level of optimization is used, allowing interprocedure optimizations since the files are compiled together (see Section 5.1.2). In interactive mode, no listing file is created; in batch mode, a listing file named XXX.LIS would be created.
The following FORTRAN command compiles the HP Fortran free-form source files AAA.F90, BBB.F90, and CCC.F90 into two object files:
$ FORTRAN AAA+BBB,CCC/LIST |
Two object files are produced: AAA.OBJ (comprising AAA.F90 and BBB.F90) and CCC.OBJ (comprising CCC.F90). One listing file is produced: CCC.LIS (comprising CCC.F90), since the positional /LIST qualifier follows a specific file name (and not the FORTRAN command). Because the default level of optimization is used, interprocedure optimizations for both AAA.F90 and BBB.F90 occur. Only interprocedure optimizations within CCC.F90 occur.
The following FORTRAN command compiles the HP Fortran free-form source files ABC.F90, CIRC.F90, and XYZ.F90, but no object file is produced:
$ FORTRAN ABC+CIRC/NOOBJECT+XYZ |
The /NOOBJECT qualifier applies to all files in the
concatenated file list and suppresses object file creation. Source
files ABC.F90, CIRC.F90, and XYZ.F90 are concatenated and compiled, but
no object file is produced.
2.2.6.5 Requesting Additional Compile-Time and Run-Time Checking
The following FORTRAN command compiles the HP Fortran free-form source file TEST.F90, requesting all possible compile-time diagnostic messages (/WARN=ALL) and run-time checking (/CHECK=ALL):
$ FORTRAN /WARNINGS=ALL /CHECK=ALL TEST.F90 |
This command creates the object file TEST.OBJ and can result in more
informational or warning compilation messages than the default level of
warning messages. Additional run-time messages can also occur.
2.2.6.6 Checking Fortran 90 or 95 Standard Conformance
The following FORTRAN command compiles the HP Fortran free-form source file PROJ_STAND.F90, requesting compile-time diagnostic messages when extensions to the Fortran 90 language are detected without creating an object file:
$ FORTRAN /STANDARD=F90 /NOOBJECT PROJ_STAND.F90 |
This command does not create an object file but issues additional compilation messages about the use of any nonstandard extensions to the Fortran 90 standard it detects.
To check for Fortran 95 standard conformance, specify /STANDARD=F95
instead of /STANDARD=F90.
2.2.6.7 Requesting Additional Optimizations
The following FORTRAN command compiles the HP Fortran free-form source files (M_APP.F90 and SUB.F90) as a single concatenated file into one object file:
$ FORTRAN /OPTIMIZE=(LEVEL=5,UNROLL=3) M_APP.F90+SUB.F90/NOLIST |
The source files are compiled together, producing an object file named M_APP.OBJ. The software pipelining optimization (/OPTIMIZE=LEVEL=4) is requested. Loops within the program are unrolled three times (UNROLL=3). Loop unrolling occurs at optimization level three (LEVEL=3) or above.
FORTRAN command qualifiers influence the way in which the compiler processes a file. In some cases, the simple FORTRAN command is sufficient. Use optional qualifiers when needed.
You can override some qualifiers specified on the command line by using
the OPTIONS statement.
The qualifiers specified by the OPTIONS statement affect only the
program unit where the statement occurs. For more information about the
OPTIONS statement, see the HP Fortran for OpenVMS Language Reference Manual.
2.3.1 FORTRAN Command Qualifier Syntax
Normal DCL parsing rules apply to the FORTRAN command, allowing you to abbreviate qualifier names and keywords as long as they are unique. For example, the following use of the FORTRAN command to specify the /ALIGNMENT qualifier as NATURAL and the /LIST qualifier is valid:
$ FORTRAN /ALIG=NAT /LIS EXTRAPOLATE.FOR |
When creating command procedures, avoid using abbreviations for qualifiers and their keywords. HP Fortran might add new qualifiers and keywords for a subsequent release that makes an abbreviated qualifier and keyword nonunique in a subsequent release.
If you specify multiple keywords for a qualifier, enclose the keywords in parentheses:
$ FORTRAN /WARN=(ALIGN, DECLARATION) EXTRAPOLATE.FOR |
To concatenate source files, separate file names with a plus sign (+)
instead of a comma (,). (See Section 2.2.2.)
2.3.2 Summary of FORTRAN Command Qualifiers
Table 2-1 lists the FORTRAN Command qualifiers, including their default values.
Sections 2.3.3 through 2.3.51 describe each qualifier in detail.
Qualifier | Default |
---|---|
/ALIGNMENT or /NOALIGNMENT or
/ALIGNMENT=
where: |
/ALIGNMENT=(COMMONS=(PACKED 1, NOMULTILANGUAGE), NOSEQUENCE 1, RECORDS=NATURAL) |
/ANALYSIS_DATA[= filename] or /NOANALYSIS_DATA | /NOANALYSIS_DATA |
/ANNOTATIONS or /NOANNOTATIONS or
/ANNOTATIONS=
|
/NOANNOTATIONS |
/ARCHITECTURE=
|
/ARCHITECTURE=GENERIC 1 |
/NOASSUME or
/ASSUME=
|
/ASSUME=(ACCURACY_SENSITIVE 1, ALTPARAM, NOBUFFERED_IO, NOBYTERECL, NODUMMY_ALIASES, NOFP_CONSTANT, NOINT_CONSTANT, NOMINUS0, PROTECT_CONSTANTS, NOSOURCE_INCLUDE) |
/AUTOMATIC or /NOAUTOMATIC | /NOAUTOMATIC |
/BY_REF_CALL=( routine-list) | No default |
/CCDEFAULT or
/CCDEFAULT=
|
/CCDEFAULT=DEFAULT |
/NOCHECK or
/CHECK=
|
/CHECK=(NOARG_TEMP_CREATED, NOBOUNDS, FORMAT 3, NOFP_EXCEPTIONS, OUTPUT_CONVERSION 3, NOOVERFLOW, POWER, NOUNDERFLOW) |
/CONVERT=
|
/CONVERT=NATIVE |
/D_LINES or /NOD_LINES | /NOD_LINES |
/DEBUG or /NODEBUG or
/DEBUG=
|
/DEBUG=(NOSYMBOLS, TRACEBACK) |
/DIAGNOSTICS[= filename] or /NODIAGNOSTICS | /NODIAGNOSTICS |
/DML | Omitted |
/DOUBLE_SIZE=
|
/DOUBLE_SIZE=64 |
/ERROR_LIMIT= n or /NOERROR_LIMIT | /ERROR_LIMIT=30 |
/EXTEND_SOURCE or /NOEXTEND_SOURCE | /NOEXTEND_SOURCE |
/F77 or /NOF77 | /F77 |
/FAST | No default |
/FLOAT=
|
/FLOAT=IEEE (I64) /FLOAT=G_FLOAT (Alpha) 4 |
/GRANULARITY=
|
/GRANULARITY=QUADWORD |
/IEEE_MODE=
|
/IEEE_MODE=DENORM_RESULTS (I64) /IEEE_MODE=FAST (Alpha) |
/INCLUDE= directory [, ...] or /NOINCLUDE | /NOINCLUDE |
/INTEGER_SIZE=
|
/INTEGER_SIZE=32 4 |
/LIBRARY | No default |
/LIST[= file-spec] or /NOLIST |
/NOLIST (interactive)
/LIST (batch) |
/MACHINE_CODE or /NOMACHINE_CODE | /NOMACHINE_CODE |
/MATH_LIBRARY=
|
/MATH_LIBRARY=ACCURATE 1 |
/MODULE= directory or /NOMODULE | /NOMODULE |
/NAMES=
|
/NAMES=UPPERCASE |
/OBJECT[= file-spec] or /NOOBJECT | /OBJECT |
/OLD_F77 (Alpha only) | Omitted |
/OPTIMIZE or /NOOPTIMIZE or
/OPTIMIZE=
|
/OPTIMIZE (same as /OPTIMIZE= (LEVEL=4, INLINE=SPEED, NOLOOPS, NOPIPELINE, TUNE=GENERIC 1, UNROLL=0)) |
/PAD_SOURCE or /NOPAD_SOURCE | /NOPAD_SOURCE |
/REAL_SIZE=
|
/REAL_SIZE=32 |
/RECURSIVE or /NORECURSIVE | /NORECURSIVE |
/NOREENTRANCY or /REENTRANCY=
|
/REENTRANCY=NONE |
/ROUNDING_MODE=
|
/ROUNDING_MODE=NEAREST |
/SEPARATE_COMPILATION or /NOSEPARATE_COMPILATION | /NOSEPARATE_COMPILATION |
/SEVERITY=WARNINGS=
|
/SEVERITY=WARNINGS=(WARNING) |
/SHOW or /NOSHOW or
/SHOW=
|
/SHOW=(NODICTIONARY, NOINCLUDE, MAP, NOPREPROCESSOR ) |
/SOURCE_FORM=
|
Depends on file type (F90 for free form and FOR or F for fixed form) |
/STANDARD=
|
/NOSTANDARD |
/SYNCHRONOUS_EXCEPTIONS or
/NOSYNCHRONOUS_EXCEPTIONS (Alpha only) |
/NOSYNCHRONOUS_EXCEPTIONS |
/SYNTAX_ONLY or /NOSYNTAX_ONLY | /NOSYNTAX_ONLY |
/TIE or /NOTIE | /NOTIE |
/VERSION | Omitted |
/VMS or /NOVMS | /VMS |
/WARNINGS or /NOWARNINGS or
/WARNINGS=
|
/WARNINGS=(ALIGNMENT, NOARGUMENT_CHECKING, NODECLARATIONS, GENERAL, GRANULARITY, NOIGNORE_LOC, NOTRUNCATED_SOURCE, UNCALLED, UNINITIALIZED, NOUNUSED, USAGE ) |
Table 2-2 shows the functional groupings of the FORTRAN command qualifiers and the section in which they are described in more detail.
Category | Flag Name and Section in this Manual |
---|---|
Carriage control for terminal or printer displays | /CCDEFAULT (see Section 2.3.10) |
Code generation for specific Alpha chip | /ARCHITECTURE (Alpha only) (see Section 2.3.6) |
Convert Nonnative Data Files |
/CONVERT (see Section 2.3.12)
/ASSUME=BYTERECL (see Section 2.3.7) Also see Chapter 9. |
Data Size |
/DOUBLE_SIZE (see Section 2.3.17)
/INTEGER_SIZE (see Section 2.3.26) /REAL_SIZE (see Section 2.3.37) Also see Chapter 8. |
Data Storage and Recursion |
/AUTOMATIC (see Section 2.3.8)
/RECURSIVE (see Section 2.3.38) |
Debugging and Symbol Table |
/D_LINES (see Section 2.3.13)
/DEBUG (see Section 2.3.14) Also see Chapter 4. |
Floating-Point Exceptions and Accuracy |
/ASSUME=([NO]ACCURACY_SENSITIVE, [NO]FP_CONSTANT, [NO]MINUS0,) (see
Section 2.3.7)
/CHECK=([NO]FP_EXCEPTIONS, [NO]POWER, [NO]UNDERFLOW) (see Section 2.3.11) /DOUBLE_SIZE (see Section 2.3.17) /FAST (see Section 2.3.21) /FLOAT (see Section 2.3.22) /IEEE_MODE (see Section 2.3.24) /MATH_LIBRARY (Alpha only) (see Section 2.3.30) /REAL_SIZE (see Section 2.3.37) /ROUNDING_MODE (see Section 2.3.40) /SYNCHRONOUS_EXCEPTIONS (Alpha only) (see Section 2.3.46) |
Floating-Point Format in Memory | /FLOAT (see Section 2.3.22) |
Language Compatibility |
/DML (see Section 2.3.16)
/F77 (see Section 2.3.20) /ALIGNMENT=COMMONS=STANDARD (see Section 2.3.3) /ASSUME=( [NO]ALTPARAM, [NO]DUMMY_ALIASES, [NO]INT_CONSTANT, /[NO]PROTECT_CONSTANTS ) (see Section 2.3.7) /BY_REF_CALL (see Section 2.3.9) /OLD_F77 (Alpha only) (see Section 2.3.34) /PAD_SOURCE (see Section 2.3.44) /SEVERITY (see Section 2.3.42) /STANDARD (see Section 2.3.45) /VMS (see Section 2.3.50) |
Language-Sensitive Editor Use | /DIAGNOSTICS (see Section 2.3.15) |
Listing File and Contents |
/ANNOTATIONS (see Section 2.3.5)
/LIST (see Section 2.3.28) /MACHINE_CODE (see Section 2.3.29) /SHOW (see Section 2.3.43) Also see Section 2.7. |
Module File Searching and Placement; Include File Searching |
/INCLUDE (see Section 2.3.25)
/ASSUME=[NO]SOURCE_INCLUDE (see Section 2.3.7) /LIBRARY (see Section 2.3.27) /MODULE (see Section 2.3.31) Also see Section 2.2.3 (modules), Section 2.2.4 (include files), and Section 2.4 (text libraries). |
Multithreaded Applications | /REENTRANCY (see Section 2.3.39) |
Object File Creation, Contents, Naming, and External Names |
/OBJECT (see Section 2.3.33)
/NAMES (see Section 2.3.32) /SEPARATE_COMPILATION (see Section 2.3.41) /SYNTAX_ONLY (see Section 2.3.47) /TIE (see Section 2.3.49) |
Performance Optimizations and Alignment |
/ALIGNMENT (see Section 2.3.3)
/ASSUME=(NOACCURACY_SENSITIVE, NODUMMY_ALIASES) (see Section 2.3.7) /ARCHITECTURE (Alpha only) (see Section 2.3.6) /FAST (see Section 2.3.21) /MATH_LIBRARY (Alpha only) (see Section 2.3.30) /OPTIMIZE (see Section 2.3.35) Also see Chapter 5. |
Recursion and Shared Access to Data |
/GRANULARITY (see Section 2.3.23)
/RECURSIVE (see Section 2.3.38) /REENTRANCY (see Section 2.3.39) /WARNINGS=GRANULARITY (see Section 2.3.51) |
Source Code Analyzer Use | /ANALYSIS_DATA (see Section 2.3.4) |
Source Form and Column Use |
/D_LINES (see Section 2.3.13)
/EXTEND_SOURCE (see Section 2.3.19) /PAD_SOURCE (see Section 2.3.36) /SOURCE_FORM (see Section 2.3.44) /WARNINGS=TRUNCATED_SOURCE (see Section 2.3.51) |
Warning Messages and Run-Time Checking |
/CHECK (see Section 2.3.11)
/ERROR_LIMIT (see Section 2.3.18) /IEEE_MODE (see Section 2.3.24) /SEVERITY (see Section 2.3.42) /WARNINGS (see Section 2.3.51) Also see the qualifiers related to "Floating-Point Exceptions and Accuracy" in this table. |
Previous | Next | Contents | Index |