About Sun WorkShop 6 f77 Compiler
Problems and Workarounds
Limitations and Incompatibilities
Sun WorkShop 6 Release
This document contains last minute information about Sun WorkShop 6
Fortran 77. It describes the software corrections addressed by this release
and lists known problems, limitations, and incompatibilities.
You can invoke the Fortran 77 compiler by typing the f77
command at a shell prompt.
The text version of this document can be viewed by typing the following
at a command prompt:
example% f77 -xhelp=readme
To access the HTML version of this document, point your Netscape(TM) Communicator
4 or compatible browser to:
Note: If your Sun WorkShop software is not installed in the standard
directory, ask your system administrator for the equivalent path on your
For more information about this product, see:
These documents are accessible in HTML by pointing your browser to
Sun WorkShop 6 Release Notes -- This documentation describes installation-related
and late-breaking information about this release. Information in the release
notes overrides information in all readme files.
f77(1) man page -- This man page
describes the f77 compiler options.
About Sun WorkShop 6 Documentation -- Describes the documentation available
with this Sun WorkShop release and how to access it.
What's New In Sun WorkShop 6 -- Describes the new features in this release
in a standard installation of Sun WorkShop.
Sun WorkShop 6 Fortran 77 (f77) runs on SPARC(TM) processors
running Solaris(TM) SPARC Platform Edition versions 2.6, 7, and 8.
About The Sun WorkShop 6 Fortran
Note - Fortran on Solaris Intel IA-32 Platforms Discontinued:
Development of the Fortran compilers (f77 and f95)
and the Sun Performance Library for the Solaris Intel IA-32 platform has
been discontinued. We suggest you contact the Portland Group (http://www.pgroup.com)
about their development tools for the Solaris IA-32 platform.
Note - Future Fortran 77 Releases:
Further development of the Fortran 77 (f77) compiler
will end soon. While it is part of this release of Sun WorkShop 6, it may
not be included in future Sun WorkShop releases. All Fortran 77 users are
encouraged to migrate their applications to the Fortran 95 compiler, f95.
This release of Sun WorkShop 6 Fortran 77 includes the following new features:
FORM="BINARY" I/O Extension: Specifying this new option
in an OPEN(..) statement causes the file to be treated as a sequential
binary (unformatted) file with no record marks. This enables data to be
written and read as a continuous stream of bytes, and provides compatibility
with other vendor systems. It is implemented in both the Fortran 95 (f95/f90)
and Fortran 77 (f77) compilers.
Effect of FORM="BINARY" on I/O operations:
Debugging Optimized Code: The restrictions on compiling with -g
have been relaxed so that it is now possible to compile at -O4
and -O5 and/or any of the parallelization flags (-parallel,
-explicitpar, -autopar) with debugging (-g).
WRITE statement: Data is written to the file in binary,
with as many bytes transferred as there is specified in the output list.
READ statement: Data is read into the variables on
the input list, with as many bytes transferred as demanded by the list.
Because there are no record marks on the file, there will be no "end-of-record"
error detection. The only error detected is end-of-file, or abnormal system
INQUIRE statement: INQUIRE on a file
opened with FORM="BINARY" returns:
BACKSPACE statement: Not allowed - returns an error.
RECL= and NEXTREC= are undefined.
ENDFILE statement: Truncates file at current position,
REWIND statement: Repositions file to beginning of
data, as usual.
Cray-Style Parallelization Directives: The AUTOSCOPE
qualifier has been implemented with Cray-style directives.
New Command-Line Flags: The following new command-line flags
appear in this release of f77 (see the f77(1)
-aligncommon - align common block elements
to specified byte boundaries
-r8const - promotes single-precision data constants to
-xmemalign - specify general alignment of data elements
Expanded Command-Line Flags: The following f77 command-line
flags have added or changed functionality (see the f77(1)
-fast - sets -O5 -fsimple=2 -xvector=yes
-xprefetch - Enables explicit pragma prefetch
directives to force generation of prefetch instructions on UltraSPARC platforms.
-xtypemap - Has an expanded set of possible
data type specifications.
Hyper-Linked Diagnostic Messages: Sun WorkShop now interprets f77
error diagnostic messages in the "Building" window, creating hypertext
links to detailed descriptions in the online help.
Many of the problems reported with previous releases of the Fortran 77
compiler have been corrected in this release.
This section discusses the following software bugs that could not be fixed
in time for this release. (Check Hot News for Sun WorkShop 6 -
Problems and Workarounds
Segmentation faults can occur in parallelized loops with programs compiled
with both -xarch=v9 and -explicitpar that
pass Cray POINTER variables as subprogram call arguments,
where the pointer is declared PRIVATE and referenced in
the loop. (4318430)
Compiler option -vpara does not function reliably and may
issue inaccurate messages.
Using Fix and Continue: In order to use the Fix and Continue feature
of Sun WorkShop, you must compile the program specifying the full pathname
of the f77 compiler. Otherwise dbx will fail with a core
dump when the "fix" command is given.(4324818):
% set f77=`which f77`
% $f77 -fast -o prog prog.f
This section discusses the following incompatibilities between Sun WorkShop
6 Fortran 77 and previous releases.
Limitations and Incompatibilities
Using -pad (-xpad) With The Default
The default setting for -xcache has changed with this
release. This could cause problems with programs that link with object
binaries compiled with -xpad and the default -xcache
previous releases of the compiler. The default -xcache
setting, -xcache=generic, is now equivalent to -xcache=2048/32/1.
Previous releases used
-xcache=64/32/1. To avoid
problems caused by the different cacheline sizes, explicitly compile with
the flag -xcache=64/32/1 when linking to older object binaries
with -xpad. (Note that -fast implies -xpad=common,
and that -xpad is a synonym for -pad).
The -oldldo option no longer supported in this release.
Linking to Sun WorkShop Libraries:
If you compile with Sun WorkShop 6 f77, you can link
only with Sun WorkShop 6 libraries and not with libraries from earlier
releases of Sun WorkShop. Programs already compiled with the f77
versions 4.2, 4.0, or 3.0.1 can also link with Sun WorkShop 6 libraries.
Linking on SPARC V9 Platforms Under Solaris 7 and 8:
Many static system libraries, such as libm.a and libc.a,
are not available in Solaris 7 or 8 environments on SPARC V9 platforms.
Only dynamic, shared libraries, libm.so and libc.so,
are provided. This means that -Bstatic and -dn
compiler options may cause linking errors on SPARC V9 platforms with Solaris
7 or 8. Applications must use dynamic libraries in these cases.
To explicitly link with a static version of a user library while linking
dynamically system libraries, use a command line that looks something like:
f77 -o prog prog.f -Bstatic -lxyz -labc -Bdynamic
This will link with libxyz.a and libabc.a,
but all other libraries, including system libraries, will be linked dynamically.
The Fortran User's Guide does not mention generic64 and
as possible settings for -xtarget,
and -xchip. See the f77(1) man page for
While the f77 compiler has not been released on the x86
Solaris (IA-32) platform, the documentation still makes some references
to x86 features and options. These should be ignored.
If your executable uses a Sun dynamic library listed in the file named
below, your license includes the right to redistribute the library to your
in a standard install of Sun WorkShop
You may not redistribute or otherwise disclose the header files, source
code, object modules, or static libraries of object modules in any form.
The License to Use appears in the End User Object Code License, viewable
from the back of the plastic case containing the CDROM.
Copyright 2000 Sun Microsystems, Inc.,
901 San Antonio Road, Palo Alto, CA 94303, U.S.A. All rights reserved.
Sun, Sun Microsystems, the Sun logo, docs.sun.com, and Solaris are
trademarks, registered trademarks, or service marks of Sun Microsystems
Inc. in the U.S. and other countries.