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 bgxlf95, bgf95, bgxlf95_r, bgxlf2003, bgf2003, bgxlf2003_r, bgxlf2008, bgf2008,
or bgxlf2008_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 wish 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/bgxlf2008
Suboption |
Output |
bgxlf2008 |
-1.0 |
bgxlf2008 -qxlf90=signedzero |
-1.0 |
bgxlf2008 -qxlf90=nosignedzero |
1.0 |
bgxlf2003 |
-1.0 |
bgxlf2003 -qxlf90=signedzero |
-1.0 |
bgxlf2003 -qxlf90=nosignedzero |
1.0 |
bgxlf95 |
-1.0 |
bgxlf95 -qxlf90=signedzero |
-1.0 |
bgxlf95 -qxlf90=nosignedzero |
1.0 |
bgxlf90 |
1.0 |
bgxlf |
1.0 |