Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

3.4 Options Reference

that do not support fused multiply-add instructions. When the minimum architecture is not used, then -fma=fused has no effect.

Fused multiply-add instructions eliminate the intermediate rounding step between the multiply and add. Consequently, programs may produce different results when compiled with - fma=fused, although precision will tend to increase rather than decrease.

3.4.28–fno-semantic-interposition, –fsemantic- interposition

–fno-semantic-interposition allows the compiler to attempt to interprocedurally optimize functions with global linker scoping.

–fsemantic-interposition prevents the interprocedural optimization of functions with global linker scoping. Interprocedural optimizations consist of inlining functions, cloning functions, and interprocedural propagation, etc. This option is particularly useful when building libraries where it is allowed to interpose on external global functions that are also used internally within the library. While this option is useful, for example, to rewrite memory allocation functions for debugging, it is expensive in terms of code quality.

In Oracle Developer Studio 12.6, -fno-semantic-interposition is the default.

3.4.28.1See Also

-xldscope, -xipo, “3.4.132 –xinline=list” on page 126,

3.4.29–fnonstd

Initialize floating–point hardware to non–standard preferences.

This option is a macro for the combination of the following option flags:

–fns -ftrap=common

Specifying -fnonstd is approximately equivalent to the following two calls at the beginning of a Fortran main program.

i=ieee_handler("set", "common", SIGFPE_ABORT) call nonstandard_arithmetic()

Chapter 3 • Fortran Compiler Options

69

3.4 Options Reference

The nonstandard_arithmetic() routine replaces the obsolete abrupt_underflow() routine of earlier releases.

To be effective, the main program must be compiled with this option.

Using this option initializes the floating-point hardware to:

Abort (trap) on floating-point exceptions.

Flush underflow results to zero if it will improve speed, rather than produce a subnormal number as the IEEE standard requires.

See -fns for more information about gradual underflow and subnormal numbers.

The -fnonstd option allows hardware traps to be enabled for floating–point overflow, division by zero, and invalid operation exceptions. These are converted into SIGFPE signals, and if the program has no SIGFPE handler, it terminates with a dump of memory.

For more information, see the ieee_handler(3M) man page and the Oracle Developer Studio 12.6: Numerical Computation Guide.

3.4.30–fns[={yes|no}]

Select nonstandard floating–point mode.

The default is the standard floating–point mode (–fns=no).

Optional use of =yes or =no provides a way of toggling the -fns flag following some other macro flag that includes it, such as -fast. -fns without a value is the same as -fns=yes.

This option flag enables nonstandard floating-point mode when the program begins execution. On SPARC platforms, specifying nonstandard floating-point mode disables “gradual underflow”, causing tiny results to be flushed to zero rather than producing subnormal numbers. It also causes subnormal operands to be silently replaced by zero. On those SPARC systems that do not support gradual underflow and subnormal numbers in hardware, use of this option can significantly improve the performance of some programs.

Where x does not cause total underflow, x is a subnormal number if and only if |x| is in one of the ranges indicated:

TABLE 10

Subnormal REAL and DOUBLE

 

 

 

Data Type

 

Range

 

 

 

REAL

 

0.0 < |x| < 1.17549435e–38

 

 

 

70 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

3.4 Options Reference

Data Type

Range

 

 

DOUBLE PRECISION

0.0 < |x| < 2.22507385072014e–308

 

 

See the Oracle Developer Studio 12.6: Numerical Computation Guide for details on subnormal numbers. (Some arithmeticians use the term denormalized number for subnormal number.)

The standard initialization of floating–point preferences is the default:

IEEE 754 floating–point arithmetic is nonstop (do not abort on exception).

Underflows are gradual.

On x86 platforms, this option is enabled only for Pentium III and Pentium 4 processors (SSE or SSE2 instruction sets).

On x86, -fns selects SSE flush-to-zero mode and where available, denormals-are-zero mode. This flag causes subnormal results to be flushed to zero. Where available, this flag also causes subnormal operands to be treated as zero. This flag has no effect on traditional x87 floatingpoint operations not utilizing the SSE or SSE2 instruction set.

To be effective, the main program must be compiled with this option.

3.4.31-fopenmp

Same as -xopenmp=parallel.

3.4.32–fpover[={yes|no}]

Detect floating-point overflow in formatted input.

With -fpover=yes specified, the I/O library will detect runtime floating-point overflows in formatted input and return an error condition (1031). The default is no such overflow detection (–fpover=no). -fpover without a value is equivalent to -fpover=yes. Combine with —ftrap to get full diagnostic information.

3.4.33–fpp

Force preprocessing of input with fpp.

Chapter 3 • Fortran Compiler Options

71

3.4 Options Reference

Pass all the input source files listed on the f95 command line through the fpp preprocessor, regardless of file extension. (Normally, only files with .F, .F90, or .F95 extension are automatically preprocessed by fpp.) See also “3.4.167 –xpp={fpp|cpp}” on page 147.

3.4.34–fprecision={single|double|extended}

(x86) Initialize non-default floating-point rounding precision mode.

Sets the floating-point precision mode to either single, double, or extended on x86 platforms.

With a value of single or double, this flag causes the rounding precision mode to be set to single or double precision respectively at program initiation. With extended, or by default when the -fprecision flag is not specified, the rounding precision mode is initialized to extended precision.

This option is effective only on x86 systems and only if used when compiling the main program, but is ignored if compiling for 64–bit (-m64) or SSE2–enabled (-xarch=sse2) processors. It is also ignored on SPARC systems.

3.4.35–free

Specify free–format source input files.

All source files on the command–line will be interpreted as f95 free format regardless of filename extension. Normally, f95 interprets .f files as fixed format, .f95 as free format.

3.4.36–fround={nearest|tozero|negative|positive}

Set the IEEE rounding mode in effect at startup.

The default is -fround=nearest.

To be effective, compile the main program with this option.

This option sets the IEEE 754 rounding mode that:

Can be used by the compiler in evaluating constant expressions.

72 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

Соседние файлы в предмете Информационные и сетевые технологии