Features and benefits
The XL Fortran compiler provides excellence in several key areas:
Language level support
The XL Fortran language sets supported by the compiler includes the following:
1. The full American National Standard Fortran 90 language (referred to as Fortran 90 or F90), defined in the documents American National Standard Programming Language Fortran 90, ANSI X3.198-1992 and Information technology - Programming languages - Fortran, ISO/IEC 1539-1:1991(E). This language has a superset of the features found in the FORTRAN 77 standard. It adds many more features that are intended to shift more of the tasks of error checking, array processing, memory allocation, and so on from the programmer to the compiler.
2. The full ISO Fortran 95 language standard (referred to as Fortran 95 or F95), defined in the document Information technology - Programming languages - Fortran - Part 1: Base language, ISO/IEC 1539-1:1997.
3. Extensions to the Fortran 95 standard:
Common industry extensions that are found in Fortran products from various compiler vendors.
Extensions specified in SAA Fortran
Extensions to the Fortran 95 language, as marked in the XL Fortran Language Reference.
4. Many Fortran 2003 standard features, such as interoperability with C.
The compiler offers you several invocation commands that you can use to compile your applications to specific Fortran language levels, as well as thread-safe counterparts to those invocations that will link and bind the object files to the thread-safe libraries and components.
Compatibility and migration support
The XL Fortran compiler helps you to port or migrate source code among Fortran compilers by providing full Fortran 90 and Fortran 95 language support, and also selected language extensions (intrinsic functions, data types, and so on) from many different compiler vendors.
To protect your investments in FORTRAN 77 object code, you can link Fortran 90 and Fortran 95 programs with existing FORTRAN 77 object files and libraries.
To help make programming and porting easier, XL Fortran also provides many common industry extensions that are not part of Fortran 95. These extensions include:
Facilities for interlanguage calls: naming conventions, %VAL and %REF functions
Extended-precision floating-point values
-qport and many other compiler options to assist in compilation of non-standard source constructs
-qintsize and -qrealsize compiler options to set default sizes of data types
-qflttrap compiler option to trap floating-point exceptions
Optional checking of array bounds
Integer pointers, similar to CRAY pointers
-qautodbl compiler option for floating-point promotion
Optional default storage-class definition
The VOLATILE statement
The BYTE data type
Relaxation of type rules in expressions
Typeless constants, such as Z'FD05'
System routines, such as getenv, system, signal, rand, dtime_, and flush_
Additional intrinsic functions, such as the CRAY conditional vector-merge functions
The DO SERIAL directive
The TYPE output statement
Record structure and union/map
The SIZEOF intrinsic
Source code conformance checking
The XL Fortran compiler provides options that warn you about features that do not conform to certain Fortran definitions, and that might cause problems when you port to or from different levels of the Fortran programming language. The compiler can check source statements for conformance to the various Fortran language standards. You can also use the langlvl runtime option for conformance checking.
Program debugging, optimization and performance
The compiler output listing has optional sections that you can include or omit. The -S option gives you a true assembler source file.
You can use a symbolic debugger to debug your programs.
The XL Fortran compiler can also help you control the optimization of your programs:
You can select from five basic levels of compiler optimizations, -O0 to -O5. You can also select additional compiler options to further instruct the compiler on how to optimize your application.
You can turn on separate optimizations for loops, floating point, and other categories.
You can optimize a program for a particular class of machines, or a very specific machine configuration, depending on where the program will run.
The XL Fortran compiler incorporates highly-tuned optimization components that are also shared with other members of the IBM XL family of compilers. Many of these optimization components are based on patented leading-edge IBM optimization technology and are specifically designed to take advantage of supported processor architectures. Optimization techniques include:
Instruction scheduling
Common-expression elimination
Strength reduction
Code motion
Inlining
Value numbering
Straightening
Reassociation
Constant propagation
Global-register allocation
Dead-code elimination
Store motion
Predictive commoning
Loop transformations
At the highest optimization levels, all of these optimization techniques are combined to maximize the performance of your application code.
Online documentation
Help is available online in HTML format, and is optimized for fast access to information on every component in XL Fortran. Most information is also provided in Adobe® PDF format.
Also, text-based man page help is available directly from your command line. This help will give you a quick reference for the format and argument description for all compiler options.
Runtime environment
XL Fortran continues to provide a runtime environment to support library modules and I/O services and utilities. The XL Fortran runtime environment includes both single-threaded and multi-threaded versions to maximize performance available to both types of applications. Various aspects of the XL Fortran runtime including I/O characteristics, error reporting, and obsolete language feature support, can be controlled using environment variables.
IBM no longer offers a separate Media Package for the XL Fortran runtime environment. The runtime component is shipped together with the XL Fortran compiler product on the same delivery media.
Solution developers marketing applications that require the XL Fortran runtime environment component may redistribute it to their customers, but their customers will not receive support directly from IBM. Solution developers wanting their customers to receive support directly from IBM should direct their customers to purchase licenses for their version of IBM XL Fortran.
The XL Fortran runtime environment component is provided as a non-warranted download from the IBM XL Fortran Web site at no charge. It must be used only for applications developed with IBM XL Fortran. You may not use any part of this component with any other application or program.
