NAGWare Fortran Tools - f95 Tools - nag_fcalls95
Index
- NAME
-
- DESCRIPTION
-
- OPTIONS
-
- NOTES
-
- SEE ALSO
-
NAME
nag_fcalls95 - Call graph generator.
DESCRIPTION
This tool prints the call graph of a Fortran 95 program. The call
graph may be generated from multiple files. Options are available to
print extra information about procedure type and generic procedure
names.
If a filename with no extension is provided the tool will look for a file
with the extension `.f95', and if that does not exist, for a file with
the extension `.f90'.
If a file has the extension `.f90' or `.f95', it will be assumed to
contain free format Fortran code. If a file has the extension
`.f', `.for', `.f77', or `.ftn', the file is assumed to contain fixed format
Fortran code. The options -fixed and -free may be used
to override this behaviour.
Modules (and include files) are expected to exist in the current working
directory or in a directory named by the -I option, see
nag_modules95.
OPTIONS
Main Options
- "Generate called-by listing" (-calledby)
-
As well as the usual call graph the tool also generates a ``called
by'' listing which lists for each routine its callers.
- "Print call graph index" (-lines)
-
As well as the usual call graph, the tool
produces an index which lists, for each program-unit, the line of the
call graph on which its subgraph begins. In
the case of procedures with dummy procedure arguments, the list
is partitioned into sublists according to the different values of the
actual procedure arguments passed.
More Advanced Options
- "Output repeated sub-trees in full" (-all)
-
Forces complete elaboration of each subgraph wherever it occurs in the
listing. Normally, a routine only has its subgraph listed on its first
occurrence and subsequent occurrences refer back to the first.
Exceptions are cyclic structures caused by recursion. These will
always have a backward reference.
- "Print procedure class" (-class)
-
Prints the procedure class with the procedure name. Classes are:
main, external, internal and module.
- "Print ENTRY points used" (-entry)
-
Prints the name of the ENTRY point used when the procedure called was
accessed through one of its ENTRY points.
- "Print call graph from" (-from pu_spec)
-
Indicates that instead of displaying the entire call graph only that
part of it beginning from the program unit specified by pu_spec should
be displayed.
pu_spec is of the form:
puname[:internal_puname]
or
modulename[:internal_puname[:internal_puname]]
Giving just modulename will cause the call graph of all the
module's internal procedures to be output.
If the call graph of the main program is required, ``%'' may be used as
shorthand for the main program unit's name (and may be used to refer
to an unnamed main program).
Multiple -from switches may be given and cause each subgraph specified
to be output. The case used in a pu_spec expression is not
significant.
Examples
Display the call graphs of all module MOD_1's internal procedures:
-from mod_1
Display the call graph of module procedure CHECK_TOTALS in module MOD_1:
-from mod_1:check_totals
Display the call graph of the internal procedure CHECK_YEAR in module
procedure CHECK_TOTALS of module MOD_1:
-from mod_1:check_totals:check_year
Display the call graph of an internal procedure DISPLAY_RESULTS declared in an
external subroutine SUB_1:
-from sub_1:display_results
Display the call graph of procedure ADD contained within the main
program CALCULATOR:
-from %:add
or
-from calculator:add
- "Print generic procedure name" (-generic)
-
Prints out the generic name used in calling procedures whenever calls
are made via a generic interface. Overloaded operators and assignment
are indicated by their respective symbols.
- "Indent" (-indent number)
-
Specifies the amount of indentation (in spaces) to use
for each level of procedure call.
- "Print location of module and internal procedures" (-locate)
-
Prints the location of an internal or module procedure.
Examples
P module M
P is a module procedure from module M.
P in S
P is an internal procedure in the external procedure S.
P
P is an external procedure.
- "Max Indent" (-maxindent number)
-
Specifies the maximum amount of indentation ever to be applied. This
option may be used to prevent the line width being exceeded in deep
call graphs.
- "Print renamed procedures" (-rename)
-
For use associated procedures, prints out the name used when calling
the procedure whenever a rename is in effect (Note: the actual
rename may have occurred in a host scope or in another module).
General Options
- "Source format" (-fixed, -free)
-
Forces the tool to assume fixed or free format for the
input file. If "Automatic" is set, .f90 files will be
assumed to contain free format code , .f, .for, .f77,
or .ftn are assumed to contain fixed format code.
- "Include and module directories" (-I)
-
Add pathname to the list of directories which are to be searched for
include files. The current working directory is always searched
first, then any directories named in -I options.
- "Fixed format source line length" (-132)
-
Increase the length of each fixed source form input line from 72
characters to 132 characters. This has no effect on free source form
input.
- "Allow double complex specific intrinsics" (-dcfuns)
-
Enable recognition of non-standard double precision complex intrinsic
functions. These act as specific versions of the standard generic intrinsics
as follows:
Non-standard Equivalent Fortran 95 Intrinsic
CDABS(A) ABS(A)
DCMPLX(X,Y) CMPLX(X,Y,KIND=KIND(0d0))
DCONJG(Z) CONJG(Z)
DIMAG(Z) AIMAG(Z)
DREAL(Z) REAL(Z) or DBLE(Z)
- "Downgrade legacy code errors to warning" (-dusty)
-
Allows the analysis of ``legacy'' software by
downgrading the category of common errors found in such software from
``Error'' to ``Warning'' (which may then be suppressed entirely with the
-w option).
- "Suppress information messages" (-info)
-
Suppress output of tool analysis stages information messages.
- "Kind numbers"
-
- "Byte kinds" (-kind=byte)
-
Alter the kind numbering system used so that the kind numbers for
INTEGER, REAL and LOGICAL match the number of bytes of storage
(e.g. default REAL is 4 and DOUBLE PRECISION is 8). Note that COMPLEX
kind numbers are the same as its REAL components, and thus half of the
total byte length in the entity.
- "Sequential kinds" (-kind=sequential)
-
This confirms the default kind numbering system where all datatypes
are numbered sequentially from 1 and increase with precision.
This option does not affect the interpretation of byte-length
specifiers (an extension to Fortran 77).
- "Downgrade argument checks between routines in different files" (-mismatch)
-
Downgrade consistency checking of procedure argument lists so that mismatches
produce warning messages instead of error messages.
This only affects calls to a routine which is not in the current file; calls
to a routine in the file being compiled must still be correct.
- "Downgrade argument checks between routines in the same file" (-mismatch_all)
-
Further downgrade consistency checking of procedure argument lists so that
calls to routines in the same file which are incorrect will produce warnings
instead of error messages.
- "Continuation line limit" (-maxcontin)
-
Increase the limit on the number of continuation lines to N. The
default, as specified by the Fortran standard, is 19 for fixed source
form and 39 for free source form. This will not decrease the limit
below the standard number.
- "Output strict Fortran 95 obsolescent messages" (-strict95)
-
Produce obsolescence warning messages for use of ``CHARACTER*'' syntax.
This message is not produced by default since most programs contain this
syntax.
- "Suppress warning messages" (-w=all)
-
Switch on or off tool analysis stages warning messages.
- "Suppress obsolescent feature warning messages" (-w=obs)
-
Switch on or off warning messages about the use of obsolescent features.
- "Suppress unused entity warning messages" (-w=unused)
-
Suppresses warning messages about unused entities.
It is equivalent to
-w=uda -w=uei -w=ulv -w=usy.
- "Suppress unused dummy argument warning messages" (-w=uda)
-
Switch on or off warning messages about unused dummy arguments.
- "Suppress unused explicit import warning messages" (-w=uei)
-
Switch on or off warning messages about unused explicit imports.
- "Suppress unused local variable warning messages" (-w=ulv)
-
Switch on or off warning messages about unused local variables.
- "Suppress unused symbol warning messages" (-w=usy)
-
Switch on or off warning messages about unused symbols.
- "Suppress Fortran 77 extension warning messages" (-w=x77)
-
Switch on or off extension warnings for common extensions to FORTRAN 77.
These are TAB format, byte-length specifiers and Hollerith constants.
- "Suppress Fortran 95 extension warning messages" (-w=x95)
-
Switch on or off extension warnings for extensions to Fortran 95.
NOTES
Illegal recursion is reported for all
non-RECURSIVE procedures found in any cycle of the call graph.
If a procedure has dummy procedure arguments, its call graph may change
depending on the values of the procedure parameters. This is
reflected in the call graph by giving the subgraph for each unique set
of procedure parameters used. For each such call the actual arguments
are listed inside curly braces. If the value of a dummy procedure
argument cannot be determined there will be missing information from
the procedure argument calls.
SEE ALSO
nag_modules95.
Copyright, Numerical Algorithms Group, Oxford, 1997-2001