The enhanced polisher takes a set of Fortran source files, which may be in fixed or free source form, and produces a free source form “polished” version of each file. C files and fpp-processed files are not handled. Unlike the simple polisher, the Fortran source files must be compilable without error; this is because the information needed for enhanced polishing requires successful semantic analysis of the files.
The enhanced polisher understands the following compiler options with the same meaning: -132, -abi, -dcfuns, -double, -dryrun, -dusty, -encoding, -english, -f2003, -f2008, -f95, -fixed, -free, -help, -I, -i8, -indirect, -info, -kind, -max_parameter_size, -maxcontin, -mismatch, -mismatch_all, -nihongo, -nocheck_modtime, -nomod, -nonstrict, -noqueue, -o, -openmp, -Qpath, -r8, -tempdir, -thread_safe, -u, -u=external, -u=locality, -u=sharing, -v, -V, -w and -xlicinfo.
The enhanced polisher includes all the simple polish options, which are not repeated here, except for -idcase=Asis.
Note that unlike nagfor =polish
, -name_scopes=Asis acts
as if it were -name_scopes=Keywords, which is the default.
Similarly, -array_constructor_brackets=Asis acts as if it were
-array_constructor_brackets=ParenSlash, and is the default, and
-dcolon_in_decls=Asis acts as if it were
-dcolon_in_decls=Insert, and is the default.
The default filename extension for the output file is ‘.f90_epo’, used when no -o option is specified.
The following additional options control the operation of this tool.
MAX
and MIN
, where it is at least three
actual arguments).
Keywords are not added to arguments that precede a label argument. The order of the arguments is unchanged.
This option is equivalent to -add_arg_keywords=all2,intrinsic3.
all | (all classes of procedure), |
bound | (object-bound and type-bound procedures), |
dummy | (dummy procedures), |
external | (external procedures), |
internal | (internal procedures), |
intrinsic | (intrinsic procedures and intrinsic module procedures), |
module | (non-intrinsic module procedures), |
user | (procedures other than intrinsic procedures and intrinsic module procedures). |
Keywords are not added to arguments that precede a label argument. The order of the arguments is unchanged. Procedure pointer components are also known as “object-bound procedures”, and thus included in -add_arg_keywords=bound; named procedure pointers are treated as external procedures and thus included in -add_arg_keywords=external.
A suboption name may be followed by a single nonzero digit (e.g.
“intrinsic3”);
this specifies that for procedures covered by that suboption, keywords are
only to be added if the procedure has at least that many dummy arguments.
For type-bound and object-bound procedures, the passed-object dummy argument
does not count towards the limit (as it never appears in the argument list).
The intrinsic MAX
and MIN
functions use the number of actual
arguments instead.
A suboption name followed by a digit may be further followed by the letter ‘a’ (e.g. “intrinsic3a”; this specifies that the argument limit applies to the number of actual arguments in a reference to the procedure, not the number of dummy arguments (the number of actual arguments will be less than the number of dummy arguments when an optional argument is omitted).
Note that suboptions are parsed from left to right, and later suboptions override earlier ones.
UPPERCASE
, lowercase
, Capitalised
, Camel_Case
), and kind is one of
the categories listed below:
comp | Component | ||
constr | Construct name | ||
intr | Intrinsic procedure | ||
param | PARAMETER | ||
proc | Procedure | ||
tbp | Type-bound procedure | ||
tparam | Derived type parameter | ||
type | Derived type | ||
var | Variable |
For example, -case:var=lower,proc=u specifies lowercase for variables and UPPERCASE for procedures.
If there is no setting for a particular kind of name, it will fall back to an appropriate category;
param
, type
, comp
, tparam
and proc
all fall back to var
,
intr
will fall back to proc
, and tbp
will fall back to comp
or proc
.
If there is no rule or fall-back rule, the -idcase= option setting (or default) is used.
maxval
or xyz
appearing as MaxVal
or XYz
respectively.
INTRINSIC
statements, and that if all
the names in an INTRINSIC
statement are removed in this way, the
INTRINSIC
statement itself should be removed.
Any comments associated with the INTRINSIC
statement will remain.
SUBROUTINE
and
CALL
statements.
By default, these optional parentheses are omitted (except for a SUBROUTINE
statement with a BIND(C)
clause).