A P P E N D I X  B

Features Release History

This Appendix lists the new and changed features in this release and previous releases of the Fortran 95 compiler.

The Fortran 95 compiler, version 7.1, is a component released with Sun Studio 8. Previous versions of the compiler were version 7.0, released with Sun ONE Studio 7, Compiler Collection (formerly Forte Developer 7), and version 6.2, released with Forte Developer 6, update 2.


B.1 Sun Studio 8 Fortran Release:

The -openmp option flag has been enhanced to facilitate debugging OpenMP programs. To use dbx to debug your OpenMP application, compile with

-openmp=noopt -g

You will then be able to use dbx to breakpoint within parallel regions and display contents of variables. See -openmp[=keyword].

Specify -xjobs=n with -xipo and the interprocedural optimizer will invoke at most n code generator instances to compile the files listed on the command line. This option can greatly reduce the build time of large applications on a multi-cpu machine. See -xjobs=n.

The ASSUME pragma is a new feature in this release of the compiler. This pragma gives hints to the compiler about conditions the programmer knows are true at some point in a procedure. This may help the compiler to do a better job optimizing the code. The programmer can also use the assertions to check the validity of the program during execution. See The ASSUME Directives, and -xassume_control[=keywords].

The following features appearing in the Fortran 2000 draft standard have been implemented in this release of Fortran 95 compiler. These are described in Chapter 4.

New intrinsic modules IEEE_ARITHMETIC, and IEEE_FEATURES provide support for exceptions and IEEE arithmetic in the Fortran language. See IEEE Floating-Point Exception Handling.

The new draft standard for Fortran provides a means of referencing C language procedures and, conversely, a means of specifying that a Fortran subprogram can be referenced from a C function. It also provides a means of declaring global variables that are linked with external C variables. See Interoperability with C Functions.

The Fortran 95 compiler now accepts the Fortran 2000 PROTECTED attribute. PROTECTED imposes limitations on the usage of module entities. Objects with the PROTECTED attribute are only definable within the module that declares them. PROTECTED Attribute.

The compiler recognizes the ASYNCHRONOUS specifier on I/O statements:

ASYNCHRONOUS=['YES' | 'NO']

This syntax is as proposed in the draft standard. See Fortran 2000 Asynchronous I/O.

A number of new features enhance the Fortran 95 compiler's compatibility with legacy Fortran 77 compiler, f77. These include variable format expressions (VFE's), long identifiers, -arg=local , and the -vax compiler option. See Chapter 3 and Chapter 4.

Two new functions enable the user to specify their own error handling routine for formatted input on a logical unit. These routines are described in I/O Error Handling Routines, and in man pages and the Fortran Library Reference.

With this release, the Fortran 95 compiler accepts a new data type, UNSIGNED, as an extension to the language. See Unsigned Integers.

A new command-line option, -xpagesize, enables the running program to set the preferred stack and heap page size at program startup. See -xpagesize=size.

This release introduces the new command-line option -xprofile_ircache= path, to speed up the "use" compilation phase during profile feedback. See -xprofile_ircache[=path]. See also -xprofile_pathmap=collect_prefix:use_prefix.

The -xknown_lib option has been enhanced to include more routines from the Basic Linear Algebra library, BLAS. See -xknown_lib=library_list.

Compile and link with the new -xlinkopt flag to invoke a post-optimizer to apply a number of advanced performance optimizations on the generated binary object code at link time. See -xlinkopt[=level].

A new extension to the -xcheck option flag enables special initialization of local variables. Compiling with -xcheck=init_local initializes local variables to a value that is likely to cause an arithmetic exception if it is used before it is assigned by the program. See -xcheck=keyword


B.2 Sun ONE Studio 7, Compiler Collection (Forte Developer 7) Release:

This release of the Forte Developer software replaces the f77 compiler with added functionality in the f95 compiler. The f77 command is a script that calls the f95 compiler:

the command:
    f77 options files libraries
becomes a call to the f95 compiler::
    f95 -f77=%all -ftrap=%none options files -lf77compat libraries

See Chapter 5 for details on Fortran 77 compatibilities and incompatibilities.

The new -f77 flag selects various compatibility features that enable the compiler to accept many Fortran 77 constructs and conventions that are normally incompatible with Fortran 95. See -f77[=list], and Chapter 5.

The f95 compiler must assume that programs it compiles adhere to the Fortran 95 standard regarding aliasing of variables through subprogram calls, global variables, pointers, and overindexing. Many "dusty deck" legacy programs intentionally utilized aliasing techniques to get around shortcomings in early versions of the Fortran language. Use the new -xalias flag to advise the compiler about how far the program deviates from the standard and what kind of aliasing syndromes it should expect. In some cases the compiler generates correct code only when the proper -xalias suboption is specified. Programs that conform strictly to the standard will find some performance improvement by advising the compiler to be unconcerned about aliasing. See -xalias[=keywords], and the chapter on Porting in the Fortran Programming Guide.

See Module Files for details.

This release of the f95 compiler adds a number of new checks to the global program analysis provided by the -Xlist flag. The new -XlistMP suboption opens a new domain of static program analysis, verification of OpenMP parallelization directives. See -Xlist[x], the Forte Developer OpenMP API User's Guide, and the chapter on Program Analysis and Debugging in the Fortran Programming Guide for details.

A new option, -xknown_lib=library, directs the compiler to treat references to certain known libraries as intrinsics, ignoring any user-supplied versions. This enables the compiler to perform optimizations over library calls based on its special knowledge of the library. In this release, the known library names are limited to blas, for a subset of the BLAS routines in the Sun Performance Library, and intrinsics, for ignoring explicit EXTERNAL declarations for Fortran 95 standard intrinsics and any user-supplied versions of these routines. See -xknown_lib=library_list.

A new directive, !$PRAGMA IGNORE_TKR {list_of_variables}, causes the compiler to ignore the type, kind, and rank for the specified dummy argument names appearing in a generic procedure interface when resolving a specific call. Using this directive greatly simplifies writing generic interfaces for wrappers that call specific library routines based on argument type, kind, and rank. See The IGNORE_TKR Directive for details.

In this f95 compiler release, runtime array subscript range checking with the -C option has been enhanced to include array conformance checking. A runtime error is produced when an array syntax statement is executed where the array sections are not conformable. See -C.

Some new formatted I/O features proposed for the next Fortran standard have been implemented in this release of f95. These are the DECIMAL=, ROUND=, and IOMSG= specifiers, and they may appear in OPEN, READ, WRITE, PRINT, and INQUIRE statements. Also implemented are the DP, DC, RP, and RC edit descriptors. See Fortran 2000 Formatted I/O Features for details.

A new option flag, -iorounding, sets the default rounding mode for formatted I/O. The modes, processor-defined or compatible, correspond to the ROUND= specifier implemented as part of the Fortran 2000 features. See -iorounding=mode.

The following flags have been removed from the f95 command line:

-db -dbl

The following f77 compiler flags have not been implemented in the f95 compiler and are also considered obsolete:

-arg=local -i2 -i4 -misalign -oldldo -r8 -vax
-xl -xvpara -xtypemap=integer:mixed

Compiling with the new -xcheck=stkovf flag adds a runtime check for stack overflow conditions on entry to subprograms. If a stack overflow is detected, a SIGSEGV segment fault is raised. Stack overflows in multithreaded applications with large arrays allocated on the stack can cause silent data corruption in neighboring thread stacks. Compile all routines with -xcheck=stkovf if stack overflow is suspected. See -xcheck=keyword.

With this release, the default slave thread stack size has been increased to 4 Megabytes on SPARC V8 platforms, and 8 Megabytes on SPARC V9 platforms. See the discussion of stacks and stack sizes in the Parallelization chapter of the Fortran Programming Guide for details.

With -xipo=1 the compiler does inlining across all source files. This release adds -xipo=2 for enhanced interprocedural aliasing analysis and memory allocation and layout optimizations to imporve cache performance. See -xipo[={0|1|2}].

Use the new flag -xprefetch_level=n to control the automatic insertion of prefetch instructions with -xprefetch=auto. Use requires an optimization level of -xO3 or greater and a target platform that supports prefetch (-xarch platforms v8plus, v8plusa, v8plusb, v9, v9a, v9b, generic64, or native64). See -xprefetch_level=n.

Feature histories for releases prior to Forte Developer 7 can be found in the documentation sets for those earlier releases on the http://docs.sun.com web site.