JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: Fortran User's Guide     Oracle Solaris Studio 12.3 Information Library
search filter icon
search icon

Document Information


1.  Introduction

2.  Using Solaris Studio Fortran

3.  Fortran Compiler Options

3.1 Command Syntax

3.2 Options Syntax

3.3 Options Summary

3.3.1 Commonly Used Options

3.3.2 Macro Flags

3.3.3 Backward Compatibility and Legacy Options

3.3.4 Obsolete Option Flags

3.4 Options Reference

3.4.1 -aligncommon[={1|2|4|8|16}]

3.4.2 -ansi

3.4.3 -arg=local

3.4.4 -autopar

3.4.5 -B{static|dynamic}

3.4.6 -C

3.4.7 -c

3.4.8 -copyargs

3.4.9 -Dname[=def]

3.4.10 -dalign

3.4.11 -dbl_align_all[={yes|no}]

3.4.12 -depend[={yes|no}]

3.4.13 -dryrun

3.4.14 -d{y|n}

3.4.15 -e

3.4.16 -erroff[={%all|%none|taglist}]

3.4.17 -errtags[={yes|no}]

3.4.18 -errwarn[={%all|%none|taglist}]

3.4.19 -ext_names=e

3.4.20 -F

3.4.21 -f

3.4.22 -f77[=list]

3.4.23 -fast

3.4.24 -fixed

3.4.25 -flags

3.4.26 -fma={none|fused}

3.4.27 -fnonstd

3.4.28 -fns[={yes|no}]

3.4.29 -fpover[={yes|no}]

3.4.30 -fpp

3.4.31 -fprecision={single|double|extended}

3.4.32 -free

3.4.33 -fround={nearest|tozero|negative|positive}

3.4.34 -fsimple[={1|2|0}]

3.4.35 -fstore

3.4.36 -ftrap=t

3.4.37 -G

3.4.38 -g

3.4.39 -hname

3.4.40 -help

3.4.41 -Ipath

3.4.42 -i8

3.4.43 -inline=[%auto][[,][no%]f1,...[no%]fn]

3.4.44 -iorounding[={compatible|processor-defined}]

3.4.45 -keeptmp

3.4.46 -Kpic

3.4.47 -KPIC

3.4.48 -Lpath

3.4.49 -lx

3.4.50 -libmil

3.4.51 -library=sunperf

3.4.52 -loopinfo

3.4.53 -Mpath

3.4.54 -m32 | -m64

3.4.55 -moddir=path

3.4.56 -mt[={yes|no}]

3.4.57 -native

3.4.58 -noautopar

3.4.59 -nodepend

3.4.60 -nofstore

3.4.61 -nolib

3.4.62 -nolibmil

3.4.63 -noreduction

3.4.64 -norunpath

3.4.65 -O[n]

3.4.66 -o filename

3.4.67 -onetrip

3.4.68 -openmp

3.4.69 -p

3.4.70 -pad[=p]

3.4.71 -pg

3.4.72 -pic

3.4.73 -PIC

3.4.74 -Qoption pr ls

3.4.75 -qp

3.4.76 -R ls

3.4.77 -r8const

3.4.78 -recl=a[,b]

3.4.79 -reduction

3.4.80 -S

3.4.81 -s

3.4.82 -silent

3.4.83 -stackvar

3.4.84 -stop_status[={yes|no}]

3.4.85 -temp=dir

3.4.86 -time

3.4.87 -traceback[={%none|common|signals_list}]

3.4.88 -U

3.4.89 -Uname

3.4.90 -u

3.4.91 -unroll=n

3.4.92 -use=list

3.4.93 -V

3.4.94 -v

3.4.95 -vax=keywords

3.4.96 -vpara

3.4.97 -Wc,arg

3.4.98 -w[n]

3.4.99 -Xlinker arg

3.4.100 -Xlist[x]

3.4.101 -xaddr32[={yes|no}]

3.4.102 -xalias[=keywords]

3.4.103 -xannotate[={yes|no}]

3.4.104 -xarch=isa Special Cautions for x86/x64 Platforms:

3.4.105 -xassume_control[=keywords]

3.4.106 -xautopar

3.4.107 -xbinopt={prepare | off}

3.4.108 -xcache=c

3.4.109 -xcheck=keyword

3.4.110 -xchip=c

3.4.111 -xcode=keyword Position-Independent Code:

3.4.112 -xcommonchk[={yes|no}]

3.4.113 -xdebugformat={dwarf|stabs}

3.4.114 -xdepend

3.4.115 -xF

3.4.116 -xfilebyteorder=options Examples: Notes:

3.4.117 -xhasc[={yes|no}]

3.4.118 -xhelp=flags

3.4.119 -xhwcprof[={enable | disable}]

3.4.120 -xia[={widestneed|strict}]

3.4.121 -xinline=list

3.4.122 -xinstrument=[%no]datarace

3.4.123 -xinterval[={widestneed|strict|no}]

3.4.124 -xipo[={0|1|2}]

3.4.125 -xipo_archive[={none|readonly|writeback}]

3.4.126 -xivdep[=p]

3.4.127 -xjobs=n

3.4.128 -xkeepframe[=[%all,%none,name,no%name]]

3.4.129 -xknown_lib=library_list

3.4.130 -xl

3.4.131 -xlang=f77

3.4.132 -xld

3.4.133 -xlibmil

3.4.134 -xlibmopt

3.4.135 -xlic_lib=sunperf

3.4.136 -xlinkopt[={1|2|0}]

3.4.137 -xloopinfo

3.4.138 -xmaxopt[=n]

3.4.139 -xmemalign[=<a><b>]

3.4.140 -xmodel=[small | kernel | medium]

3.4.141 -xnolib

3.4.142 -xnolibmil

3.4.143 -xnolibmopt

3.4.144 -xOn

3.4.145 -xopenmp[={parallel|noopt|none}]

3.4.146 -xpad

3.4.147 -xpagesize=size

3.4.148 -xpagesize_heap=size

3.4.149 -xpagesize_stack=size

3.4.150 -xpec[={yes|no}]

3.4.151 -xpg

3.4.152 -xpp={fpp|cpp}

3.4.153 -xprefetch[=a[,a]] Defaults: Interactions: Warnings:

3.4.154 -xprefetch_auto_type=indirect_array_access

3.4.155 -xprefetch_level={1|2|3}

3.4.156 -xprofile=p

3.4.157 -xprofile_ircache[=path]

3.4.158 -xprofile_pathmap=collect_prefix:use_prefix

3.4.159 -xrecursive

3.4.160 -xreduction

3.4.161 -xregs=r

3.4.162 -xs

3.4.163 -xsafe=mem

3.4.164 -xspace

3.4.165 -xtarget=t Generic and Native Platforms SPARC Platforms x86 Platforms

3.4.166 -xtime

3.4.167 -xtypemap=spec

3.4.168 -xunroll=n

3.4.169 -xvector[=a]

3.4.170 -ztext

4.  Solaris Studio Fortran Features and Extensions

5.  FORTRAN 77 Compatibility: Migrating to Solaris Studio Fortran

A.  Runtime Error Messages

B.  Features Release History

C.  Fortran Directives Summary


3.3 Options Summary

In this section, the compiler options are grouped by function to provide an easy reference. The details will be found on the pages in the following sections, as indicated.

Note that not all options are available on both SPARC and x64/x86 platforms. Check the detailed reference section for availability.

The following table summarizes the f95 compiler options by functionality. The table does not include obsolete and legacy option flags. Some flags serve more than one purpose and appear more than once.

Table 3-3 Compiler Options Grouped by Functionality

Option Flag
Compilation Mode:
Compile only; do not produce an executable file
Show commands built by the driver but do not compile
Support Fortran 77 extensions and compatibility
Retains the temporary files that are created during compilation.
Specify path for writing compiled .mod Module files
Specify name of object, library, or executable file to write
-o filename
Compile and generate only assembly code
Strip symbol table from executable
Suppress compiler messages, except error messages
Define path to directory for temporary files
Show elapsed time for each compilation phase
Show version number of compiler and its phases
Verbose messages
Specify non-standard aliasing situations
Compile with multiple processors
Compiled Code:
Add/suppress trailing underscores on external names
Inline specified user functions
Compile position independent code
Inline certain math library routines
STOP returns integer status value to shell
Specify code address space
Enable prefetch instructions
Specify use of optional registers
Specify default data mappings
Data Alignment:
Specify alignment of data in COMMON blocks
Force COMMON block data alignment to allow double word fetch/store
Force alignment of all data on 8-byte boundaries
Align COMMON block data on 8-byte boundaries
Support file sharing between little-endian and big-endian platforms.
Specify memory alignment and behavior
Enable runtime subscript range checking
Compile for debugging with dbx
Flag use of undeclared variables
Check !$PRAGMA ASSUME assertions
Check for stack overflow at runtime
Enable runtime task common check
Compile for Performance Analyzer
Generate cross-reference listings
Enable debugging without object files
Flag use of non-standard extensions
Suppress named warning messages
Display error tag names with error messages
Show summary of compiler options
-flags, -help
Show version number of the compiler and its phases
Verbose messages
Verbose parallelization messages
Show/suppress warning messages
Linking and Libraries:
Allow/require dynamic/static libraries
Allow only dynamic/static library linking
-dy, -dn
Build a dynamic (shared object) library
Assign name to dynamic library
Add directory to library search path
Link with library libname.a or
Do not build library search path into executable.
Build runtime library search path into executable
Disable use of incremental linker, ild
Link with optimized math library
Link with Sun Performance Library
Link editor option
Generate pure libraries with no relocations
Numerics and Floating-Point:
Use non-standard floating-point preferences
Select non-standard floating point
Enable runtime floating-point overflow during input
Select IEEE floating-point rounding mode
Select floating-point optimization level
Select floating-point trapping mode
Specify rounding method for formatted input/output
Promote single precision constants to double precision
Enable interval arithmetic and set the appropriate floating-point environment (includes -xinterval)
Enable interval arithmetic extensions
Optimization and Performance:
Analyze loops for data dependencies
Optimize using a selection of options
Specify optimization level
Pad data layout for efficient use of cache
Allocate local variables on the memory stack
Enable loop unrolling
Invoke interprocedural optimizations pass
Set highest optimization level for #pragma OPT
Compile for post-compilation optimizations
Enable/adjust compiler generated prefetch instructions
Control automatic generation of prefetch instructions
Enable generation or use of performance profiling data
Assert that no memory-based traps will occur
Do no optimizations that increase code size
Generate calls to vector library functions automatically
Enable automatic parallelization of DO loops
Show loop parallelization information
Compile for hand-coded multithreaded programming
Accept OpenMP API directives and set appropriate environment
Recognize reduction operations in loops with automatic parallelization
Verbose parallelization messages
Source Code:
Define preprocessor symbol
Undefine preprocessor symbol
Accept extended (132 character) source lines
Apply preprocessor to .F and/or .F90 and .F95 files but do not compile
Accept Fortran 95 fixed-format input
Preprocess all source files with the fpp preprocessor
Accept Fortran 95 free-format input
Add directory to include file search path
Add directory to module search path
Recognize upper and lower case as distinct
Tread hollerith as character in actual arguments
Select preprocessor, cpp or fpp, to use
Allow recursive subprogram calls
Target Platform:
Specify memory model, 32 or 64 bits.
-m32 | —m64
Specify target platform instruction set for the optimizer
Specify target cache properties for optimizer
Specify target processor for the optimizer
Specify target platform for the optimizer

3.3.1 Commonly Used Options

The compiler has many features that are selectable by optional command–line parameters. The short list below of commonly used options is a good place to start.

Table 3-4 Commonly Used Options

Debug—global program checking across routines for consistency of arguments, commons, and so on.
Debug—produce additional symbol table information to enable the dbx and debugging.
Performance—invoke the optimizer to produce faster running programs.
Performance—Produce efficient compilation and run times for the native platform, using a set of predetermined options.
Dynamic (–Bdynamic) or static (–Bstatic) library binding.
Compile only—Suppress linking; make a .o file for each source file.
Output file—Name the executable output file nm instead of a.out.
–o nm
Source code—Compile fixed format Fortran source code.

3.3.2 Macro Flags

Some option flags are macros that expand into a specific set of other flags. These are provided as a convenient way to specify a number of options that are usually expressed together to select a certain feature.

Table 3-5 Macro Option Flags

Option Flag
-xmemalign=8s -aligncommon=16
See description of —fast for complete current expansion.
-fns -ftrap=common
-xinterval=widestneed -ftrap=%none -fns=no -fsimple=0
-xinterval=strict -ftrap=%none -fns=no -fsimple=0
-xarch=a -xcache=b -xchip=c

Settings that follow the macro flag on the command line override or add to the the expansion of the macro.

3.3.3 Backward Compatibility and Legacy Options

The following options are provided for backward compatibility with earlier compiler releases, and certain Fortran legacy capabilities.

Table 3-6 Backward Compatibility Options

Preserve actual arguments over ENTRY statements
Allow assignment to constant arguments.
Treat hollerith constant as character or typeless in call argument lists.
Support Fortran 77 extensions and conventions
Nonstandard arithmetic—allow nonstandard arithmetic.
Optimize performance for the host system.
DO loops—use one trip DO loops.
Allow legacy aliasing situations

Use of these option flags is not recommended for producing portable Fortran programs.

3.3.4 Obsolete Option Flags

The following options are considered obsolete and should not be used. They might be removed from later releases of the compiler.

Table 3-7 Obsolete f95 Options

Option Flag
License queueing. No longer needed.
Profiling. Use -pg or the Performance Analyzer
Use —m32