Sun Studio 12 Update 1: Fortran User's Guide

3.4.111 –xassume_control[=keywords]

Set parameters to control ASSUME pragmas.

Use this flag to control the way the compiler handles ASSUME pragmas in the source code.

The ASSUME pragmas provide a way for the programmer to assert special information that the compiler can use for better optimization. These assertions may be qualified with a probability value. Those with a probability of 0 or 1 are marked as certain; otherwise they are considered non-certain.

You can also assert, with a probability or certainty, the trip count of an upcoming DO loop, or that an upcoming branch will be taken.

See 2.3.1.8 The ASSUME Directives, for a description of the ASSUME pragmas recognized by the f95 compiler.

The keywords on the -xassume_control option can be a single suboption keyword or a comma-separated list of keywords. The keyword suboptions recognized are:

optimize

The assertions made on ASSUME pragmas affect optimization of the program.

check

The compiler generates code to check the correctness of all assertions marked as certain, and emits a runtime message if the assertion is violated; the program continues if fatal is not also specified.

fatal

When used with check, the program will terminate when an assertion marked certain is violated.

retrospective[:d]

The d parameter is an optional tolerance value, and must be a real positive constant less than 1. The default is ".1". retrospective compiles code to count the truth or falsity of all assertions. Those outside the tolerance value d are listed on output at program termination.

%none

All ASSUME pragmas are ignored.

The compiler default is

-xassume_control=optimize

This means that the compiler recognizes ASSUME pragmas and they will affect optimization, but no checking is done.

If specified without parameters, -xassume_control implies

-xassume_control=check,fatal

In this case the compiler accepts and checks all certain ASSUME pragmas, but they do not affect optimization. Assertions that are invalid cause the program to terminate.