2. Using Solaris Studio Fortran
4. Solaris Studio Fortran Features and Differences
5. FORTRAN 77 Compatibility: Migrating to Solaris Studio Fortran
B.1 Oracle Solaris Studio 12.2 Fortran Release
B.2 Sun Studio 12 Update 1 Fortran Release
B.3 Sun Studio 12 Fortran Release
B.4 Sun Studio 11 Fortran Release
B.5 Sun Studio 10 Fortran Release:
B.6 Sun Studio 9 Fortran Release:
Fortran 77 Functionality Absorbed Into Fortran 95 Compiler
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 4.12 Mixing Languages for details on Fortran 77 compatibilities and incompatibilities.
Fortran 77 Compatibility Mode:
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 3.4.23 -f77[=list], and 4.12 Mixing Languages.
Compiling “Dusty Deck” Programs That Employ Non-Standard Aliasing:
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 3.4.108 -xalias[=keywords], and the chapter on Porting in the Fortran Programming Guide.
Enhanced MODULE Features:
New flag -use=list forces one or more implicit USE statements into each subprogram. See 3.4.100 -use=list.
New flag -moddir=path controls where the compiler writes compiled MODULE subprograms (.mod files). See 3.4.55 -moddir=path. A new environment variable, MODDIR, also controls where .mod files are written.
The -Mpath flag will now accept directory paths, archive (.a) files, or module (.mod) files to search for MODULE subprograms. The compiler determines the type of the file by examining its contents; the actual file name extension is ignored. See 3.4.53 -Mpath.
When searching for modules, the compiler now looks first in the directory where module files are being written.
See 4.9 Module Files for details.
Enhanced Global Program Analysis With -Xlist:
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 3.4.106 -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.
Identifying Known Libraries With -xknown_lib=library:
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 3.4.136 -xknown_lib=library_list.
Ignoring Dummy Argument Type in Interfaces:
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 2.3.1.2 The IGNORE_TKR Directive for details.
Enhanced -C Runtime Array Checking:
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 3.4.6 -C.
Introducing Fortran 2003 Features:
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 4.6.9 Fortran 2003 Formatted I/O Features for details.
Rounding in Formatted I/O:
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 2003 features. See 3.4.45 -iorounding[={compatible|processor-defined}].
Obsolete Flags Removed:
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
Checking for Stack Overflow:
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 3.4.115 -xcheck=keyword.
New Default Thread Stack Size:
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.
Enhanced Interprocedural Optimizations:
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 3.4.131 -xipo[={0|1|2}].
Control Prefetch Instructions With -xprefetch_level=n:
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 3.4.163 -xprefetch_level={1|2|3}.
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.