XL Fortran for AIX 8.1

User's Guide


Summary of the XL Fortran Compiler Options

The following tables show the compiler options available in the XL Fortran compiler that you can enter in the configuration file, on the command line, or in the Fortran source code by using the @PROCESS compiler directive.

You can enter compiler options that start with -q, suboptions, and @PROCESS directives in either uppercase or lowercase. However, note that if you specify the -qmixed option, procedure names that you specify for the -qextern option are case-sensitive.

In general, this book uses the convention of lowercase for -q compiler options and suboptions and uppercase for @PROCESS directives. However, in the "Syntax" sections of this chapter and in the "Command-Line Option" column of the summary tables, we use uppercase letters in the names of -q options, suboptions, and @PROCESS directives to represent the minimum abbreviation for the keyword. For example, valid abbreviations for -qOPTimize are -qopt, -qopti, and so on.

Understanding the significance of the options you use and knowing the alternatives available can save you considerable time and effort in making your programs work correctly and efficiently.

Options That Control Input to the Compiler

The following options affect the compiler input at a high level. They determine which source files are processed and select case sensitivity, column sensitivity, and other global format issues.

Related Information:
See XL Fortran Input Files and Options That Specify the Locations of Output Files.

Many of the options in Options for Compatibility change the permitted input format slightly.

Table 3. Options That Control Input to the Compiler

Command-Line Option @PROCESS Directive Description See Page
-Idir   Adds a directory to the search path for include files and .mod files. If XL Fortran calls cpp, this option adds a directory to the search path for #include files. Before checking the default directories for include and .mod files, the compiler checks each directory in the search path. For include files, this path is only used if the file name in an INCLUDE line is not provided with an absolute path. For #include files, refer to the cpp documentation for the details of the -I option.
Default:
The following directories are searched, in the following order:
  1. The current directory
  2. The directory where the source file is
  3. /usr/include
-I Option
-qci=numbers CI(numbers) Activates the specified INCLUDE lines.
Default:
No default value.
-qci Option
-qdirective
[=directive_list]
-qnodirective
[=directive_list]
DIRECTIVE
[(directive_list)]
NODIRECTIVE
[(directive_list)]
Specifies sequences of characters, known as trigger constants, that identify comment lines as compiler comment directives.
Default:
Comment lines beginning with IBM* are considered directives. If you specify -qsmp=omp, only $OMP is considered to be a directive trigger. All other directive triggers are turned off unless you explicitly turn them back on. If you specify -qsmp=noomp (noomp is the default for -qsmp), IBMP, $OMP and SMP$ are considered directive triggers, along with any other directive triggers that are turned on (such as IBM* and IBMT). If you have also specified -qthreaded, comment lines beginning with IBMT are also considered directives.
-qdirective Option
-qfixed
[=right_margin]
FIXED
[(right_margin)]
Indicates that the input source program is in fixed form and optionally specifies the maximum line length.
Default:
-qfree=f90 for the xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, and xlf95_r7 commands and -qfixed=72 for the xlf, xlf_r, xlf_r7, and f77 commands.
-qfixed Option
-qfree[={f90|ibm}]
-k
FREE[({F90|
IBM})]
Indicates that the source code is in free form. The ibm and f90 suboptions specify compatibility with the free form defined for VS FORTRAN and Fortran 90/Fortran 95, respectively. -k and -qfree are short forms for -qfree=f90.
Default:
-qfree=f90 for the xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, and xlf95_r7 commands and -qfixed=72 for the xlf, xlf_r, xlf_r7, and f77 commands.
-qfree Option
-qmbcs
-qnombcs
MBCS
NOMBCS
Indicates to the compiler whether character literal constants, Hollerith constants, H edit descriptors, and character string edit descriptors can contain Multibyte Character Set (MBCS) or Unicode characters.
Default:
-qnombcs.
-qmbcs Option
-U
-qmixed
-qnomixed
MIXED
NOMIXED
Makes the compiler sensitive to the case of letters in names.
Default:
-qnomixed.
-U Option
-qsuffix={suboptions}   Specifies the source-file suffix on the command line. -qsuffix Option

Options That Specify the Locations of Output Files

The following options specify names or directories where the compile stores output files.

In the table, an * indicates that the option is processed by the ld command, rather than by the XL Fortran compiler; you can find more information about these options in the AIX information for the ld command.

Related Information:
See XL Fortran Output Files and Options That Control Input to the Compiler.

Table 4. Options That Specify the Locations of Output Files

Command-Line Option @PROCESS Directive Description See Page
-d   Leaves preprocessed source files produced by cpp, instead of deleting them.
Default:
Temporary files produced by cpp are deleted.
-d Option
-o name*   Specifies a name for the output object, executable, or assembler source file.
Default:
-o a.out.
-o Option
-qmoddir=directory   Specifies the location for any module (.mod) files that the compiler writes.
Default:
.mod files are placed in the current directory.
-qmoddir Option

Options for Performance Optimization

The following options can help you to speed up the execution of your XL Fortran programs or to find areas of poor performance that can then be tuned. The most important such option is -O. In general, the other performance-related options work much better in combination with -O; some have no effect at all without -O.

Related Information:
See Chapter 8, Optimizing XL Fortran Programs.

Some of the options in Options for Floating-Point Processing can also improve performance, but you must use them with care to avoid error conditions and incorrect results.

Table 5. Options for Performance Optimization

Command-Line Option
@PROCESS Directive Description See Page
-O[level]
-qoptimize[=level]
-qnooptimize

OPTimize[(level)]
NOOPTimize
Specifies whether code is optimized during compilation and, if so, at which level (0, 2, 3, 4, or 5).
Default:
-qnooptimize.
-O Option
-P{v|k}[!]
  Invokes the selected optimizing preprocessor. Adding ! prevents the compilation step from following preprocessing.
Note:
The preprocessors are available as separate vendor-logo products.
Default:
No preprocessing.
-P Option
-p
-pg

  Sets up the object file for profiling.
Default:
No profiling.
-p Option
-Q
-Q!
-Q+names
-Q-names

  Specifies whether procedures are inlined and/or particular procedures that should or should not be inlined. names is a list of procedure names separated by colons.
Default:
No inlining.
-Q Option
-qalias=
{[no]aryovrlp |
[no]intptr|
[no]pteovrlp|
[no]std}...]

ALIAS(
{[NO]ARYOVRLP
|[NO]INTPTR
|[NO]PTEOVRLP
|[NO]STD}... )
Indicates whether a program contains certain categories of aliasing. The compiler limits the scope of some optimizations when there is a possibility that different names are aliases for the same storage locations.
Default:
-qalias=aryovrlp:nointptr:pteovrlp:std for the xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, and xlf95_r7 commands; -qalias=aryovrlp:intptr:pteovrlp:std for the xlf, xlf_r, xlf_r7, f77, and fort77 commands.
-qalias Option
-qalign={[no]4k|struct [=packed | natural| port]}
ALIGN( {[NO]4K | STRUCT[packed | natural| port]}) Specifies the alignment of data objects in storage, which avoids performance problems with misaligned data. Both the [no]4k and struct options can be specified and are not mutually exclusive. The default setting is -qalign=no4k:struct=natural. The [no]4K option is useful primarily in combination with logical volume I/O and disk striping.
Default:
-qalign=no4k:struct=natural.
-qalign Option
-qarch=architecture
  Controls which instructions the compiler can generate. Changing the default can improve performance but might produce code that can only be run on specific machines. The choices are com, auto, rs64a, rs64b, rs64c, p2sc, pwr, pwr2 (or pwrx), pwr3, pwr4, pwr2s, ppc, 601, 603, and 604.
Default:
-qarch=com, if you specify -q32, which uses only instructions that are common to all platforms. If you specify -q64, the default is ppc, which allows you to run the executable file on any 64-bit PowerPC hardware platform.
-qarch Option
-qassert={ deps |
nodeps | itercnt=n}

  Provides information about the characteristics of the files that can help to fine-tune optimizations.
Default:
-qassert=deps:itercnt=1024.
-qassert Option
-qcache={
auto |
assoc=number |
cost=cycles |
level=level |
line=bytes |
size=Kbytes |
type={C|D|I}}[:...]

  Specifies the cache configuration for a specific execution machine. The compiler uses this information to tune program performance, especially for loop operations that can be structured (or blocked) to process only the amount of data that can fit into the data cache.
Default:
The compiler uses typical values based on the -qtune setting, the -qarch setting, or both settings.
-qcache Option
-qcompact
-qnocompact

COMPACT
NOCOMPACT
Reduces optimizations that increase code size.
Default:
-qnocompact.
-qcompact Option
-qfdpr
-qnofdpr

  Provides object files with information needed for the AIX fdpr (Feedback Directed Program Restructuring) performance-tuning utility to optimize the resulting executable file.
Default:
-qnofdpr.
-qfdpr Option
-qhot[=suboptions]
-qnohot

HOT[=suboptions]
NOHOT
Determines whether to perform high-order transformations on loops and array language during optimization and whether to pad array dimensions and data objects to avoid cache misses.
Default:
-qnohot.
-qhot Option
-qipa[=suboptions]
  Enhances -O optimization by doing detailed analysis across procedures (interprocedural analysis or IPA).
Default:
-O analyzes each subprogram separately, ruling out certain optimizations that apply across subprogram boundaries. Note that specifying -O5 is equivalent to specifying -O4 and -qipa=level=2.
-qipa Option
-qlargepage
-qnolargepage


Indicates to the compiler that a program, designed to execute in a large page memory environment, can take advantage of large 16 MB pages provided on POWER4 and higher based systems. -qlargepage Option
-qpdf{1|2}
  Tunes optimizations through profile-directed feedback (PDF), where results from sample program execution are used to improve optimization near conditional branches and in frequently executed code sections.
Default:
Optimizations use fixed assumptions about branch frequency and other statistics.
-qpdf Option
-qsmallstack
-qnosmallstack


Specifies that the compiler will minimize stack usage where possible.

-qsmallstack Option
-qsmp[=suboptions]
-qnosmp

  When used with xlf_r, xlf_r7, xlf90_r, xlf90_r7, xlf95_r, or xlf95_r7, controls automatic parallelization of loops, user-directed parallelization of loops and other items, and the choice of chunking algorithm.
Default:
-qnosmp.
-qsmp Option
-qstrict
-qnostrict

STRICT
NOSTRICT
Ensures that optimizations done by the -O3, -O4, -O5, -qhot, and -qipa options do not alter the semantics of a Fortran 90 or Fortran 95 program.
Default:
With -O3 and higher levels of optimization in effect, code may be rearranged so that results or exceptions are different from those in unoptimized programs.
-qstrict Option
-qstrictieeemod
-qnostrictieeemod

STRICTIEEE-
MOD
NOSTRICTIEEE-
MOD
Specifies whether the compiler will adhere to the Fortran 2000 IEEE arithmetic rules for the ieee_arithmetic and ieee_exceptions intrinsic modules.
Default:
-qstrictieeemod
-qstrictieeemod Option
-qstrict_induction
-qnostrict_induction


Prevents the compiler from performing induction (loop counter) variable optimizations. These optimizations may be unsafe (may alter the semantics of your program) when there are integer overflow operations involving the induction variables.

Default:
-qnostrict_induction.
-qstrict_induction Option
-qsuppress=
nnnn-mmm[:nnnn-mmm...]
-qnosuppress

  Specifies selective messages to suppress from the output stream. -qsuppress Option
-qthreaded
  Specifies that the compiler should generate thread-safe code. This is turned on by default for the xlf_r, xlf_r7, xlf90_r, xlf90_r7, xlf95_r, and xlf95_r7 commands. -qthreaded Option
-qtune=implementation
  Tunes instruction selection, scheduling, and other implementation-dependent performance enhancements for a specific implementation of a hardware architecture. The following settings are valid: auto, 601, 603, 604, pwr, pwr2 (or pwrx), pwr3, pwr4, pwr2s, rs64a, rs64b, rs64c, or p2sc.
Default:
-qtune=pwr2 if you specify -q32 and enable the -qarch=com option. If you specify -q64 and enable the -qarch=ppc option, the default is -qtune=pwr3.
-qtune Option
-qunroll [=auto | yes]
-qnounroll


Specifies whether the compiler is allowed to automatically unroll DO loops.
Default:
-qunroll=auto
-qunroll Option
-qunwind
-qnounwind

UNWIND
NOUNWIND
Specifies default behavior for saving and restoring from volatile registers during a procedure call.
Default:
-qunwind
-qunwind Option
-qzerosize
-qnozerosize

ZEROSIZE
NOZEROSIZE
Improves performance of FORTRAN 77 and some Fortran 90 and Fortran 95 programs by preventing checking for zero-sized character strings and arrays.
Default:
-qzerosize for the xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, and xlf95_r7 commands and -qnozerosize for the xlf, xlf_r, xlf_r7, f77, and fort77 commands (meaning these commands cannot be used for programs that contain zero-sized objects).
-qzerosize Option

Options for Error Checking and Debugging

The following options help you avoid, detect, and correct problems in your XL Fortran programs and can save you having to refer as frequently to Chapter 11, Problem Determination and Debugging.

In particular, -qlanglvl helps detect portability problems early in the compilation process by warning of potential violations of the Fortran standards. These can be due to extensions in the program or due to compiler options that allow such extensions.

Other options, such as -C and -qflttrap, detect and/or prevent run-time errors in calculations, which could otherwise produce incorrect output.

Because these options require additional checking at compile time and some of them introduce run-time error checking that slows execution, you may need to experiment to find the right balance between extra checking and slower compilation and execution performance.

Using these options can help to minimize the amount of problem determination and debugging you have to do. Other options you may find useful while debugging include:


Table 6. Options for Debugging and Error Checking

Command-Line Option @PROCESS Directive Description See Page
-C
-qcheck
-qnocheck
CHECK
NOCHECK
Checks each reference to an array element, array section, or character substring for correctness. Out-of-bounds references are reported as severe errors if found at compile time and generate SIGTRAP signals at run time.
Default:
-qnocheck.
-C Option
-D
-qdlines
-qnodlines
DLINES
NODLINES
Specifies whether fixed-form lines with a D in column 1 are compiled or treated as comments.
Default:
-qnodlines.
-D Option
-g
-qdbg
-qnodbg
DBG
NODBG
Generates debug information for use by a symbolic debugger.
Default:
-qnodbg.
-g Option
-qdpcl
-qnodpcl
DPCL
NODPCL
Generates symbols that tools based on the Dynamic Probe Class Library (DPCL) can use to see the structure of an executable file.
Default:
-qnodpcl.
-qdpcl Option
-qextchk
-qnoextchk
EXTCHK
NOEXTCHK
Sets up type-checking information for common blocks, procedure definitions, procedure references, and module data. Later, the linker can detect mismatches across compilation units by using this information.
Default:
-qnoextchk.
-qextchk Option
-qflttrap
[=suboptions]
-qnoflttrap
FLTTRAP
[(suboptions)]
NOFLTTRAP
Determines what types of floating-point exception conditions to detect at run time. The program receives a SIGTRAP signal when the corresponding exception occurs.
Default:
-qnoflttrap.
-qflttrap Option
-qfullpath
-qnofullpath
  Records the full, or absolute, path names of source and include files in object files compiled with debugging information (-g option).
Default:
The relative path names of source files are recorded in the object files.
-qfullpath Option
-qhalt=sev HALT(sev) Stops before producing any object, executable, or assembler source files if the maximum severity of compile-time messages equals or exceeds the specified severity. severity is one of i, l, w, e, s, u, or q, meaning informational, language, warning, error, severe error, unrecoverable error, or a severity indicating "don't stop".
Default:
-qhalt=S.
-qhalt Option
-qinitauto[=hex_value]
-qnoinitauto
  Initializes each byte or word (4 bytes) of storage for automatic variables to a specific value, depending on the length of the hex_value. This helps you to locate variables that are referenced before being defined. For example, by using both the -qinitauto option to initialize REAL variables with a NaNS value and the -qflttrap option, it is possible to identify references to uninitialized REAL variables at run time.
Default:
-qnoinitauto. If you specify -qinitauto without a hex_value, the compiler initializes the value of each byte of automatic storage to zero.
-qinitauto Option
-qlanglvl={
77std
| 90std
| 90pure
| 90ext
| 95std
| 95pure
| extended}


LANGLVL({
77STD
| 90STD
| 90PURE
| 90EXT
| 95STD
| 95PURE
| EXTENDED})
Determines which language standard (or superset or subset of a standard) to consult for nonconformance. It identifies nonconforming source code and also options that allow such nonconformances.
Default:
-qlanglvl=extended.
-qlanglvl Option
-qsaa
-qnosaa
SAA
NOSAA
Checks for conformance to the SAA FORTRAN language definition. It identifies nonconforming source code and also options that allow such nonconformances. -qsaa Option
-qsigtrap[=
trap_handler]
  Installs xl_ _trce or a predefined or user-written trap handler in a main program.
Default:
No trap handler installed; program core dumps when a trap instruction is executed.
-qsigtrap Option
-qtbtable={none
| small
| full}
  Limits the amount of debugging traceback information in object files, to reduce the size of the program.
Default:
Full traceback information in the object file when compiling non-optimized (without -O) or for debugging (with -g). Otherwise, a small amount of traceback information in the object file.
-qtbtable Option
-qwarn64
-qnowarn64
  Detects the truncation of an 8-byte integer pointer to 4 bytes. Identifies, through informational messsages, statements that might cause problems during the 32-bit to 64-bit migration.
Default:
-qnowarn64.

-qxlines
-qnoxlines
XLINES
NOXLINES
Specifies whether fixed-form lines with a X in column 1 are treated as source code and compiled, or treated instead as comments.
Default:
-qnoxlines.
-qxlines Option

Options That Control Listings and Messages

The following options determine whether the compiler produces a listing (.lst file), what kinds of information go into the listing, and what the compiler does about any error conditions it detects.

Some of the options in Options for Error Checking and Debugging can also produce compiler messages.

Table 7. Options That Control Listings and Messages

Command-Line Option @PROCESS Directive Description See Page
-#   Generates information on the progress of the compilation without actually running the individual components.
Default:
No progress messages are produced.
-# Option
-qattr[=full]
-qnoattr
ATTR[(FULL)]
NOATTR
Specifies whether to produce the attribute component of the attribute and cross-reference section of the listing.
Default:
-qnoattr.
-qattr Option
-qflag=
listing_severity:
terminal_severity
-w
FLAG
(listing_severity,
terminal_severity)
Limits the diagnostic messages to those of a specified level or higher. Only messages with severity listing_severity or higher are written to the listing file. Only messages with severity terminal_severity or higher are written to the terminal. -w is a short form for -qflag=e:e.
Default:
-qflag=i:i.
-qflag Option
-qlist
-qnolist
LIST
NOLIST
Specifies whether to produce the object section of the listing.
Default:
-qnolist.
-qlist Option
-qlistopt
-qnolistopt
LISTOPT
NOLISTOPT
Determines whether to show the setting of every compiler option in the listing file or only selected options. These selected options include those specified on the command line or directives plus some that are always put in the listing.
Default:
-qnolistopt.
-qlistopt Option
-qnoprint   Prevents the listing file from being created, regardless of the settings of other listing options.
Default:
Listing is produced if you specify any of -qattr, -qlist, -qlistopt, -qphsinfo, -qreport, -qsource, or -qxref.
-qnoprint Option
-qphsinfo
-qnophsinfo
PHSINFO
NOPHSINFO
Determines whether timing information is displayed on the terminal for each compiler phase.
Default:
-qnophsinfo.
-qphsinfo Option
-qreport[={smplist
| hotlist}...]
-qnoreport
REPORT
[({SMPLIST |
HOTLIST}...)]
NOREPORT
Determines whether to produce transformation reports showing how the program is parallelized and how loops are optimized.
Default:
-qnoreport.
-qreport Option
-qsource
-qnosource
SOURCE
NOSOURCE
Determines whether to produce the source section of the listing.
Default:
-qnosource.
-qsource Option
-qxref
-qnoxref
-qxref=full
XREF
NOXREF
XREF(FULL)
Determines whether to produce the cross-reference component of the attribute and cross-reference section of the listing.
Default:
-qnoxref.
-qxref Option
-S   Produces one or more .s files showing equivalent assembler source for each Fortran source file.
Default:
The output is an executable file.
-S Option
-v   Traces the progress of the compilation by displaying the name and parameters of each compiler component that is executed by the invocation command.
Default:
No progress messages are produced.
-v Option
-V   Traces the progress of the compilation by displaying the name and parameters of each compiler component that is executed by the invocation command. These are displayed in a shell-executable format.
Default:
No progress messages are produced.
-V Option

Options for Compatibility

The following options help you maintain compatibility between your XL Fortran source code on past, current, and future hardware platforms or help you port programs to XL Fortran with a minimum of changes.

Related Information:
Chapter 14, Porting Programs to XL Fortran discusses this subject in more detail. Duplicating the Floating-Point Results of Other Systems explains how to use some of the options in Options for Floating-Point Processing to achieve floating-point results compatible with other systems.

The -qfree=ibm form of the -qfree Option also provides compatibility with VS FORTRAN free form.

Table 8. Options for Compatibility

Command-Line Option @PROCESS Directive Description See Page
-qautodbl=setting AUTODBL(setting) Provides an automatic means of converting single-precision floating-point calculations to double-precision and of converting double-precision calculations to extended-precision. Use one of the following settings: none, dbl, dbl4, dbl8, dblpad, dblpad4, or dblpad8.
Default:
-qautodbl=none.
-qautodbl Option
-qcclines
-qnocclines
CCLINES
NOCCLINES
Determines whether the compiler recognizes conditional compilation lines.
Default:
-qcclines if you have specified the -qsmp=omp option; otherwise, -qnocclines.
-qcclines Option
-qctyplss
[=([no]arg)]
-qnoctyplss
CTYPLSS
[([NO]ARG)]
NOCTYPLSS
Specifies whether character constant expressions are allowed wherever typeless constants may be used. This language extension might be needed when you are porting programs from other platforms. Suboption arg specifies that Hollerith constants used as actual arguments will be treated as integer actual arguments.
Default:
-qnoctyplss.
-qctyplss Option
-qddim
-qnoddim
DDIM
NODDIM
Specifies that the bounds of pointee arrays are re-evaluated each time the arrays are referenced and removes some restrictions on the bounds expressions for pointee arrays.
Default:
-qnoddim.
-qddim Option
-qdpc
-qdpc=e
-qnodpc
DPC
DPC(E)
NODPC
Increases the precision of real constants, for maximum accuracy when assigning real constants to DOUBLE PRECISION variables. This language extension might be needed when you are porting programs from other platforms.
Default:
-qnodpc.
-qdpc Option
-qescape
-qnoescape
ESCAPE
NOESCAPE
Specifies how the backslash is treated in character strings, Hollerith constants, H edit descriptors, and character string edit descriptors. It can be treated as an escape character or as a backslash character. This language extension might be needed when you are porting programs from other platforms.
Default:
-qescape.
-qescape Option
-qessl  

Allows the use of ESSL routines in place of Fortran 90 Intrinsic Procedures. Use the ESSL Serial Library when linking with -lessl. Use the ESSL SMP Library when linking with -lesslsmp.

Default:
-qnoessl.
-qessl Option
-qextern=names   Allows user-written procedures to be called instead of XL Fortran intrinsics. names is a list of procedure names separated by colons. The procedure names are treated as if they appear in an EXTERNAL statement in each compilation unit being compiled. If any of your procedure names conflict with XL Fortran intrinsic procedures, use this option to call the procedures in the source code instead of the intrinsic ones.
Default:
Names of intrinsic procedures override user-written procedure names when they are the same.
-qextern Option
-qextname
-qnoextname
EXTNAME
NOEXTNAME
Adds an underscore to the names of global entities, which helps in porting programs from systems where this is a convention for mixed-language programs.
Default:
-qnoextname.
-qextname Option
-qintlog
-qnointlog
INTLOG
NOINTLOG
Specifies that you can mix integer and logical values in expressions and statements.
Default:
-qnointlog.
-qintlog Option
-qintsize=bytes INTSIZE(bytes) Sets the size of default INTEGER and LOGICAL values.
Default:
-qintsize=4.
-qintsize Option
-qlog4
-qnolog4
LOG4
NOLOG4
Specifies whether the result of a logical operation with logical operands is a LOGICAL(4) or is a LOGICAL with the maximum length of the operands.
Default:
-qnolog4.
-qlog4 Option
-qnullterm
-qnonullterm
NULLTERM
NONULLTERM
Appends a null character to each character constant expression that is passed as a dummy argument, to make it more convenient to pass strings to C functions.
Default:
-qnonullterm.
-qnullterm Option
-1
-qonetrip
-qnoonetrip
ONETRIP
NOONETRIP
Executes each DO loop in the compiled program at least once if its DO statement is executed, even if the iteration count is 0.
Default:
-qnoonetrip.
-1 Option
-qport
[=suboptions]
-qnoport
PORT
[(suboptions)]
NOPORT
Increases flexibility when porting programs to XL Fortran by providing a number of options to accommodate other Fortran language extensions.
Default:
-qnoport.
-qport Option
-qposition=
{appendold |
appendunknown}
POSITION(
{APPENDOLD |
APPENDUNKNOWN})
Positions the file pointer at the end of the file when data is written after an OPEN statement with no POSITION= specifier and the corresponding STATUS= value (OLD or UNKNOWN) is specified.
Default:
Depends on the I/O specifiers in the OPEN statement and on the compiler invocation command: -qposition=appendold for the xlf, xlf_r, xlf_r7, and f77 commands and the defined Fortran 90 and Fortran 95 behaviors for the xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, and xlf95_r7 commands.
-qposition Option
-qqcount
-qnoqcount
QCOUNT
NOQCOUNT
Accepts the Q character-count edit descriptor (Q) as well as the extended-precision Q edit descriptor (Qw.d). With -qnoqcount, all Q edit descriptors are interpreted as the extended-precision Q edit descriptor.
Default:
-qnoqcount.
-qqcount Option
-qrealsize=bytes REALSIZE(bytes) Sets the default size of REAL, DOUBLE PRECISION, COMPLEX, and DOUBLE COMPLEX values.
Default:
-qrealsize=4.
-qrealsize Option
-qsave[={all |
defaultinit}]
-qnosave
SAVE{(ALL |
DEFAULTINIT)}
NOSAVE
Specifies the default storage class for local variables. -qsave, -qsave=all, or -qsave=defaultinit sets the default storage class to STATIC, while -qnosave sets it to AUTOMATIC.
Default:
-qnosave.

Specify -qsave for the xlf, xlf_r, xlf_r7, f77, or fort77 to duplicate the behaviour of FORTRAN77 commands.

-qsave Option
-qswapomp
-qnoswapomp
SWAPOMP
NOSWAPOMP
Specifies that the compiler should recognize and substitute OpenMP routines in XL Fortran programs.
Default:
-qswapomp.
-qswapomp Option
-u
-qundef
-qnoundef
UNDEF
NOUNDEF
Specifies whether implicit typing of variable names is permitted. -u and -qundef have the same effect as the IMPLICIT NONE statement that appears in each scope that allows implicit statements.
Default:
-qnoundef.
-u Option
-qxflag=oldtab XFLAG(OLDTAB) Interprets a tab in columns 1 to 5 as a single character (for fixed-form programs), for compatibility with XL Fortran Version 1.
Default:
Tab is interpreted as one or more characters.
-qxflag=oldtab Option
-qxlf77=settings XLF77(settings) Provides backward compatibility with the language from XL Fortran Versions 1 and 2 for aspects of language semantics and I/O data format that have changed. Most of these changes are required by the Fortran 90 standard.
Default:
Default suboptions are blankpad, nogedit77, nointarg, nointxor, leadzero, nooldboz, nopersistent, and nosofteof for the xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, and xlf95_r7 commands and are the exact opposite for the xlf, xlf_r, xlf_r7, and f77 commands.
-qxlf77 Option
-qxlf90=
{[no]signedzero |
[no]autodealloc}
XLF90(
{[no]signedzero |
[no]autodealloc})
Determines whether the compiler provides the Fortran 90 or the Fortran 95 level of support for certain aspects of the language.
Default:
The default suboptions are signedzero and autodealloc for the xlf95, xlf95_r, and xlf95_r7 invocation commands. For all other invocation commands, the default suboptions are nosignedzero and noautodealloc.
-qxlf90 Option

Option for New Language Extensions

The following option is intended for writing new programs. It changes the program in ways that would otherwise require source-code changes.

Table 9. Option for Fortran 90 Extensions

Command-Line Option @PROCESS Directive Description See Page
-qinit=f90ptr INIT(f90ptr) Makes the initial association status of pointers disassociated.
Default:
The default association status of pointers is undefined.
-qinit Option

Options for Floating-Point Processing

To take maximum advantage of the system floating-point performance and precision, you may need to specify details of how the compiler and XLF-compiled programs perform floating-point calculations.

Related Information:
See -qflttrap Option and Duplicating the Floating-Point Results of Other Systems.

Table 10. Options for Floating-Point Processing

Command-Line Option @PROCESS Directive Description See Page
-qfloat=options FLOAT(options) Determines how the compiler generates or optimizes code to handle particular types of floating-point calculations.
Default:
Default suboptions are nofltint, fold, nohsflt, nohssngl, nonans, norndsngl, maf, norrm, norsqrt, and nostrictnmaf; some of these settings are different with -O3 optimization turned on or with -qarch=ppc.
-qfloat Option
-qieee={ Near
| Minus
| Plus
| Zero}
-y{n|m|p|z}
IEEE({Near
| Minus
| Plus
| Zero})
Specifies the rounding mode for the compiler to use when evaluating constant floating-point expressions at compile time.
Default:
-qieee=near.
-qieee Option

Options That Control Linking

The following options control the way the ld command processes object files during compilation. Some of these options are passed on to ld and are not processed by the compiler at all.

You can actually include ld options on the compiler command line, because the compiler passes unrecognized options on to the linker.

In the table, an * indicates that the option is processed by the ld command, rather than the XL Fortran compiler; you can find more information about these options in the AIX information for the ld command.

Related Information:
The -qextchk Option enables some extra consistency checking during linking.

Other linker options you might find helpful are the following:


Table 11. Options That Control Linking

Command-Line Option @PROCESS Directive Description See Page
-b64*   Instructs ld to bind 64-bit objects in 64-bit mode. -b64 Option
-bdynamic*
-bshared*
-bstatic*
  These options are toggles used to control the processing of -l options and the way that shared objects are processed. -bdynamic, -bshared, and -bstatic Options
-bhalt:error_level*   Specifies the maximum error level allowed before linker command processing halts.
Default:
-bhalt:4, as specified in the configuration file.
-bhalt Option
-bloadmap:name*   Requests that a log of linker actions and messages be saved in file name.
Default:
No log is kept.
-bloadmap Option
-bmaxdata:bytes*
-bmaxstack:bytes*
  Specifies the maximum amount of space to reserve for the program data segment and stack segment for programs where the size of these regions is a constraint.
Default:
Combined stack and data space is slightly less than 256 MB, or lower, depending on the limits for the user ID.
-bmaxdata, -bmaxstack Options
-brtl*
-bnortl*
  Determines which algorithm is used to find libraries (specified with the -l option). -brtl Option
-c   Produces an object file instead of an executable file.
Default:
Compile and link-edit, producing an executable file.
-c Option
-Ldir*   Looks in the specified directory for libraries specified by the -l option.
Default:
/usr/lib.
-L Option
-lkey*   Searches the specified library file, where key selects the file libkey.a.
Default:
Libraries listed in xlf.cfg.
-l Option
-qOBJect
-qNOOBJect
OBJect
NOOBJect
Specifies whether to produce an object file or to stop immediately after checking the syntax of the source files.
Default:
-qobject.
-qobject Option

Options That Control the Compiler Internal Operation

These options can help to do the following:


Table 12. Options That Control the Compiler Internal Operation

Command-Line Option @PROCESS Directive Description See Page
-Bprefix   Determines a substitute path name for executable files used during compilation, such as the compiler or linker. It can be used in combination with the -t option, which determines which of these components are affected by -B.
Default:
Paths for these components are defined in the configuration file, the $PATH environment variable, or both.
-B Option
-Fconfig_file
-Fconfig_file:
stanza
-F:stanza
  Specifies an alternative configuration file, the stanza to use within the configuration file, or both.
Default:
The configuration file is /etc/xlf.cfg, and the stanza depends on the name of the command that executes the compiler.
-F Option
-q32   Sets the bit mode and instruction set for a 32-bit target architecture. -q32 Option
-q64   Sets the bit mode and instruction set for a 64-bit target architecture. -q64 Option
-qlm
-qnolm
  Disables the license management control.
Default:
The license management control system (LM) is on by default. You must specify the compiler option -qnolm to disable LM.
-qlm Option
-NSbytes
-qSPILLsize=
bytes
SPILLsize
(bytes)
Specifies the size of internal program storage areas.
Default:
-NS512
-N Option
-qmaxmem=
Kbytes
MAXMEM
(Kbytes)
Limits the amount of memory that the compiler allocates while performing specific, memory-intensive optimizations to the specified number of kilobytes. A value of -1 allows optimization to take as much memory as it needs without checking for limits.
Default:
-qmaxmem=2048; -qmaxmem=-1 under -O3.
-qmaxmem Option
-qsclk=[centi | micro ]
Specifies that when returning a value using the SYSTEM_CLOCK intrinsic procedure, the compiler will use centisecond resolution. You can specify a microsecond resolution by using -qsclk=micro.

Default: -qsclk=centi

-qsclk Option
-tcomponents   Applies the prefix specified by the -B option to the designated components. components can be one or more of p, F, c, d, I, a, h, b, z, or l, with no separators, corresponding to an optimizing preprocessor, the C preprocessor, the compiler, the -S disassembler, the interprocedural analysis (IPA) tool, the assembler, the loop optimizer, the code generator, the binder (fast linker), and the linker, respectively.
Default:
-B prefix, if any, applies to all components.
-t Option
-Wcomponent,options   Passes the listed options to a component that is executed during compilation. component is p, F, c, d, I, a, z, or l, corresponding to an optimizing preprocessor, the C preprocessor, the compiler, the -S disassembler, the interprocedural analysis (IPA) tool, the assembler, the binder (fast linker), and the linker, respectively.
Default:
The options passed to these programs are as follows:
  • Those listed in the configuration file
  • Any unrecognized options on the command line (passed to the linker)
-W Option

Options That Are Obsolete or Not Recommended

The following options are obsolete for either or both of the following reasons:

Notes:

  1. If you do use any of these options in existing makefiles or compilation scripts, you should migrate to the new alternatives as soon as you can to avoid any potential problems in the future.

  2. The append suboption of -qposition has been replaced by appendunknown.

Table 13. Options That Are Obsolete or Not Recommended

Command-Line Option @PROCESS Directive Description See Page
-qcharlen=
length
CHARLEN
(length)
Obsolete. It is still accepted, but it has no effect. The maximum length for character constants and subobjects of constants is 32 767 bytes (32 KB). The maximum length for character variables is 268 435 456 bytes (256 MB) in 32-bit mode. The maximum length for character variables is 2**40 bytes in 64-bit mode. These limits are always in effect and are intended to be high enough to avoid portability problems with programs that contain long strings. -qcharlen Option
-qrecur
-qnorecur
RECUR
NORECUR
Not recommended. Specifies whether external subprograms may be called recursively.

For new programs, use the RECURSIVE keyword, which provides a standard-conforming way of using recursive procedures. If you specify the -qrecur option, the compiler must assume that any procedure could be recursive. Code generation for recursive procedures may be less efficient. Using the RECURSIVE keyword allows you to specify exactly which procedures are recursive.

-qrecur Option


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]