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

3.4 Options Reference

Like -V, shows the name of each pass as the compiler executes, and details the options, macro flag expansions, and environment variables used by the driver.

3.4.105 –vax=keywords

Specify choice of legacy VAX VMS Fortran extensions enabled.

The keywords specifier must be one of the following sub-options or a comma-delimited list of a selection of these.

blank_zero

Interpret blanks in formatted input as zeros on internal files.

 

 

debug

Interpret lines starting with the character ’D’ to be regular Fortran statements rather

 

than comments, as in VMS Fortran.

 

 

rsize

Interpret unformatted record size to be in words rather than bytes.

 

 

struct_align

Layout components of a VAX structure in memory as in VMS Fortran, without

 

padding. Note: this can cause data misalignments, and should be used with —xmemalign

 

to avoid such errors.

 

 

%all

Enable all these VAX VMS features.

 

 

%none

Disable all these VAX VMS features.

 

 

Sub-options can be individually selected or turned off by preceding with no%.

Example:

-vax=debug,rsize,no%blank_zero

The default is -vax=%none. Specifying -vax without any sub-options is equivalent to -vax=% all.

3.4.106 –vpara

Show parallelization warning messages.

Issues warnings about potential parallel programming problems in OpenMP programs. Use with the -xopenmp option.

Chapter 3 • Fortran Compiler Options

101

3.4 Options Reference

The compiler issues warnings when it detects the following situations:

Loops are parallelized using OpenMP directives when there are data dependencies between different loop iterations.

OpenMP data-sharing attributes-clauses are problematic. For example, declaring a variable "shared" whose accesses in an OpenMP parallel region may cause data race, or declaring a variable "private" whose value in a parallel region is used after the parallel region.

No warnings appear if all parallelization directives are processed without problems.

3.4.107 -Wc,arg

Passes the argument arg to a specified component c.

Arguments must be separated from the preceding only by a comma. All -W arguments are passed after the rest of the command-line arguments. To include a comma as part of an argument, use the escape character \ (backslash) immediately before the comma. All -W arguments are passed after the regular command-line arguments.

For example, -Wa,-o,objfile passes -o and objfile to the assembler in that order. Also, -Wl,- I,name causes the linking phase to override the default name of the dynamic linker, /usr/lib/

ld.so.1.

The order in which the arguments are passed to a tool with respect to the other specified command line options might change in subsequent compiler releases.

The possible values for c are listed in the following table.

TABLE 12

-W Flags

 

 

 

Flag

 

Meaning

 

 

 

a

 

Assembler: (fbe); (gas)

 

 

 

c

 

Fortran code generator: (cg) (SPARC) ;

 

 

 

d

 

f95 driver

 

 

 

l

 

Link editor (ld)

 

 

 

m

 

mcs

 

 

 

O (Capital o)

 

Interprocedural optimizer

 

 

 

o (Lowercase o)

 

Postoptimizer

 

 

 

p

 

Preprocessor (fpp or cpp)

 

 

 

0 (Zero)

 

Compiler (f90comp)

 

 

 

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

3.4 Options Reference

Flag

Meaning

 

 

2

Optimizer: (iropt)

 

 

3

Static error checking: (previse)

 

 

Note: You cannot use -Wd to pass f95 options to the Fortran compiler.

3.4.108 –w[n]

Show or suppress warning messages.

This option shows or suppresses most warning messages. However, if one option overrides all or part of an option earlier on the command line, you do get a warning.

n may be 0, 1, 2, 3, or 4.

-w0 shows just error messages. This is equivalent to -w. -w1 shows errors and warnings. This is the default without -w.-w2 shows errors, warnings, and cautions.-w3 shows errors, warnings, cautions, and notes.-w4 shows errors, warnings, cautions, notes, and comments.

3.4.109 -Xlinker arg

Pass arg to linker ld(1).

3.4.110 –xaddr32[={yes|no}]

(x86/x64 only) The -xaddr32=yes compilation flag restricts the resulting executable or shared object to a 32-bit address space.

An executable that is compiled in this manner results in the creation of a process that is restricted to a 32-bit address space. When -xaddr32=no is specified a usual 64 bit binary is produced. If the -xaddr32 option is not specified, -xaddr32=no is assumed. If only -xaddr32 is specified -xaddr32=yes is assumed.

This option is only applicable to -m64 compilations and only on Oracle Solaris platforms supporting SF1_SUNW_ADDR32 software capability. Since the Oracle Linux kernel does not

Chapter 3 • Fortran Compiler Options

103

3.4 Options Reference

support address space limitation this option is not available on Oracle Linux. The -xaddr32 option is ignored on Oracle Linux.

When linking, if a single object file was compiled with -xaddr32=yes the whole output file is assumed to be compiled with -xaddr32=yes. A shared object that is restricted to a 32-bit

address space must be loaded by a process that executes within a restricted 32-bit mode address space. For more information refer to the SF1_SUNW_ADDR32 software capabilities definition, described in the Oracle Solaris 11.3 Linkers and Libraries Guide.

3.4.111 –xalias[=keywords]

Specify degree of aliasing to be assumed by the compiler.

Some non-standard programming techniques can introduce situations that interfere with the compiler’s optimization strategies. The use of overindexing, pointers, and passing global or non-unique variables as subprogram arguments, can introduce ambiguous aliasing situations that could result code that does not work as expected.

Use the -xalias flag to inform the compiler about the degree to which the program deviates from the aliasing requirements of the Fortran standard.

The flag may appear with or without a list of keywords. The keywords list is comma-separated, and each keyword indicates an aliasing situation present in the program.

Each keyword may be prefixed by no% to indicate an aliasing type that is not present.

The aliasing keywords are:

TABLE 13

-xalias Option Keywords

 

 

 

keyword

 

meaning

 

 

 

dummy

 

Dummy (formal) subprogram parameters can alias each other and global variables.

 

 

 

no%dummy

 

(Default). Usage of dummy parameters follows the Fortran standard and do not alias

 

 

each other or global variables.

 

 

 

craypointer

 

(Default). Cray pointers can point at any global variable or a local variable whose

 

 

address is taken by the LOC() function. Also, two Cray pointers might point at the same

 

 

data. This is a safe assumption that could inhibit some optimizations.

 

 

 

no%craypointer

 

Cray pointers point only at unique memory addresses, such as obtained from malloc().

 

 

Also, no two Cray pointers point at the same data. This assumption enables the

 

 

compiler to optimize Cray pointer references.

 

 

 

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

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