Go to main content
Oracle® Developer Studio 12.6: Fortran User's Guide

Exit Print View

Updated: July 2017

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 5  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
Do not replace a module file whose content is not changed by the compilation of the associated Fortran module
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
Generate make dependencies
(Oracle Solaris) Link debug information from object files into executable
Compiled Code:
Add/suppress trailing underscores on external names
Inline specified user functions
Compile position independent code
Inline certain math library routines
(x86) Save copies of register-based function arguments in the stack
STOP returns integer status value to shell
Specify code address space
Equivalent to -inline
Manually change the heuristics used by the compiler for deciding when to inline a function call
Generate a report written to standard output on the inlining of functions by the compiler
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
Control compression of the debug section.
Specify format of compression of the debug section.
Control how much debugging and observability information is emitted
Compile for Performance Analyzer
Control globalization of file static variables but not functions
Keep definitions of unreferenced functions and variables
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
(Oracle Solaris) Link debug information from object files into executable
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 libname.so
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
Reserve an area of memory before the start of each function
Specify whether the program contains references to dynamically bound symbols
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
Optimization and Performance:
Analyze loops for data dependencies
Optimize using a selection of options
Control optimizations that impact interposing on global library functions.
Specify that the program does not perform I/O in more than one thread at a time.
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
Reduce compile time by avoiding optimizations during the initial pass through the compiler, optimizing only at link time
Set highest optimization level for #pragma OPT
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
Cause the driver to include a special mapfile on the link line.
Do no optimizations that increase code size
Specify that the application will be run in situations where many processes are simultaneously running on the system
Generate calls to vector library functions automatically
Enable automatic parallelization of DO loops
Equivalent to -xopenmp=parallel
Show loop parallelization information
Compile for hand-coded multithreaded programming
Accept OpenMP API directives. The -xopenmp option flag accepts the following sub-option keywords: parallel, noopt, and none.
Recognize reduction operations in loops with automatic parallelization
Verbose parallelization messages
Specify that the application will be run in situations where many processes are simultaneously running on the system
Source Code:
Define preprocessor symbol
Undefine preprocessor symbol
Accept extended (250 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 data type 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 6  Commonly Used Options
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 7  Macro Option Flags
Option Flag
-xmemalign=8s -aligncommon=16
See description of —fast for complete current expansion.
-fns -ftrap=common
-xarch=a -xcache=b -xchip=c

Settings that follow the macro flag on the command line override or add to 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 8  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 9  Obsolete f95 Options
Option Flag
Profiling. Use -pg or the Performance Analyzer
Obsolete. Use -xarch=generic instead.
Obsolete. Use -xarch=generic instead.
Obsolete. Use -xchip=generic instead.
Obsolete. Use -xchip=generic instead.
Obsolete. Use -xchip=generic instead.
Obsolete. Use -xchip=generic instead.
Obsolete. Use -xtarget=generic instead.
Obsolete. Use -xtarget=generic instead.
Obsolete. Use -xtarget=generic instead.
Use -xlibmopt=%none instead.