Purpose
Provides compatibility with the
Fortran 90 standard for certain aspects of the Fortran language.
Syntax
Option:
.-nooldpad------.
+-signedzero----+
+-autodealloc---+
>>- -q--xlf90--=--+-noautodealloc-+----------------------------><
+-nosignedzero--+
'-oldpad--------'
@PROCESS:
@PROCESS XLF90(settings)
Defaults
The default suboptions for -qxlf90 depend
on the invocation command that you specify.
For the xlf95, f95, xlf95_r, xlf2003, f2003, xlf2003_r, xlf2008, f2008,
or xlf2008_r
command, the default suboptions are signedzero, autodealloc,
and nooldpad .
For all other invocation
commands, the defaults are nosignedzero, noautodealloc and oldpad .
Parameters
- signedzero | nosignedzero
- Determines how the SIGN(A,B) function
handles signed real 0.0.If you specify the -qxlf90=signedzero compiler
option, SIGN(A,B) returns -|A| when B=-0.0.
This behavior conforms to the Fortran 95 standard and is consistent
with the IEEE standard for binary floating-point arithmetic. Note
that for the REAL(16) data type, XL Fortran
never treats zero as negative zero.
This suboption also determines
whether a minus sign is printed in the following cases:
- For a negative zero in formatted output. Again, note that for
the REAL(16) data type, XL Fortran never
treats zero as negative zero.
- For negative values that have an output form of zero (that is,
where trailing non-zero digits are truncated from the output so that
the resulting output looks like zero). Note that in this case, the signedzero suboption
does affect the REAL(16) data type; non-zero
negative values that have an output form of zero will be printed
with a minus sign.
When using -qxlf90=nosignedzero,
consider setting the -qstrict=nozerosigns option
to improve performance.
- autodealloc | noautodealloc
- Determines whether the compiler deallocates allocatable objects
that are declared locally without either the SAVE or
the STATIC attribute and have a status of
currently allocated when the subprogram terminates. This behavior
conforms with the Fortran 95 standard. If you are certain
that you are deallocating all local allocatable objects explicitly,
you may want to turn off this suboption to avoid
possible performance degradation.
- oldpad | nooldpad
- When the PAD=specifier is present in the INQUIRE statement,
specifying -qxlf90=nooldpad returns UNDEFINED when there is
no connection, or when the connection is for unformatted I/O. This
behavior conforms with the Fortran 95 standard and above. Specifying -qxlf90=oldpad preserves
the Fortran 90 behavior.
Examples
Consider the following program:
PROGRAM TESTSIGN
REAL X, Y, Z
X=1.0
Y=-0.0
Z=SIGN(X,Y)
PRINT *,Z
END PROGRAM TESTSIGN
The output from this example depends
on the invocation command and the
-qxlf90 suboption
that you specify. For example:
Invocation Command/xlf2008
Suboption |
Output |
xlf2008 |
-1.0 |
xlf2008 -qxlf90=signedzero |
-1.0 |
xlf2008 -qxlf90=nosignedzero |
1.0 |
xlf2003 |
-1.0 |
xlf2003 -qxlf90=signedzero |
-1.0 |
xlf2003 -qxlf90=nosignedzero |
1.0 |
xlf95 |
-1.0 |
xlf95 -qxlf90=signedzero |
-1.0 |
xlf95 -qxlf90=nosignedzero |
1.0 |
xlf90 |
1.0 |
xlf |
1.0 |