Things to note in IBM XL Fortran for AIX, V15.1.3

Because IBM® XL Fortran for AIX®, V15.1.3 is highly compatible with XL Fortran Versions 14 through 3 inclusive, most of the advice in this section applies to upgrades from Version 2, or earlier levels of XL Fortran.
  • The xlf90, xlf90_r, xlf90_r7, and f90 commands provide Fortran 90 conformance. The xlf95, xlf95_r, xlf95_r7, and f95 commands provide Fortran 95 conformance. The xlf2003, xlf2003_r, and f2003 commands provide Fortran 2003 conformance. The xlf2008, xlf2008_r, and f2008 commands provide partial Fortran 2008 conformance. However, these commands may cause some problems with existing FORTRAN 77 programs. The xlf, xlf_r, xlf_r7, f77, and fort77 commands avoid some of these problems by keeping the old behavior wherever possible.
  • Fortran 90 introduced the idea of kind parameters for types. Except for the types complex and character, XL Fortran uses numeric kind parameters that correspond to the lengths of the types. For the type complex, the kind parameter is equal to the length of the real portion, which is half of the overall length. For the type character, the kind parameter is equal to the number of bytes that are required to represent each character, and this value is 1. A FORTRAN 77 declaration that is written using the * extension for length specifiers can now be rewritten with a kind parameter:
           INTEGER*4  X   ! F77 notation with extension.
           INTEGER(4) X   ! F90 standard notation.
           COMPLEX*8  Y   ! *n becomes (n) for all types except
           COMPLEX(4) Y   ! COMPLEX, where the value is halved.
    This new form is the one that is used consistently throughout the XL Fortran manuals.

    Because the values of kind parameters may be different for different compilers, you may want to use named constants, placed in an include file or a module, to represent the kind parameters used in your programs. The SELECTED_CHAR_KIND, SELECTED_INT_KIND and SELECTED_REAL_KIND intrinsic functions also let you determine kind values in a portable way.

  • Fortran 90 introduced a standardized free source form for source code, which is different from the XL Fortran Version 2 free source form. The -qfree and -k options now use the Fortran 90 free source form; the Version 2 free source form is available through the option -qfree=ibm.
  • The library that provides Fortran 90, Fortran 95, Fortran 2003, and partial Fortran 2008 support is libxlf90.a, located in /usr/lib. A libxlf.a library of stub routines is provided in /usr/lib, but it is only used for linking existing Version 1 or 2 object files or running existing executables. When a Version 1 or Version 2 object file calls entry points in libxlf.a, those entry points then call equivalent entry points in libxlf90.a. If you recompile such object files, the result could be improved I/O performance, because the entry points in libxlf90.a are called directly.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us