FTNLINT(1) Last changed: 7-25-97
ftnlint, cflint - Checks Fortran programs for possible errors
ftnlint [-h] [-o filename] [-r number] [-s number]
[-V] file.f[90] [file.T] ...
cflint [-h] [-o filename] [-r number] [-s number]
[-V] file.f[90] [file.T] ...
ftnlint is supported on UNICOS, UNICOS/mk, and IRIX systems
cflint is supported on UNICOS and UNICOS/mk systems
The ftnlint and cflint commands check Fortran programs for program
constructs that may need further investigation (for example, arguments
that are never used or local variables used before they are defined).
ftnlint and cflint perform these checks on two levels: local per
subprogram and global for all encountered subprograms.
For each Fortran source file (.f or .f90 suffix) to be checked, you
must supply a corresponding compiler information file (.T suffix). On
UNICOS and UNICOS/mk systems, create the CIF by executing the f90(1)
command with the -Ca option. On IRIX systems, create the CIF by
executing the f90(1) command with the -cif option.
The ftnlint and cflint commands support the following options:
-h Displays only command line options and suppressable message
IDs (no program execution).
-o filename
Writes the output to filename instead of stdout.
-r number Restores/enables subprogram or global message number, which
can be a range (for example, -r22-51 or -r503-507). The
valid ranges for number are 1 through 77 and 501 through
531. -r 0 restores all messages. See individual message
IDs for local and global messages in the table that follows
(with -s option).
-s number Suppresses subprogram or global message number, which can be
a range (for example, -s22-51 or -s503-507). The valid
values for number range from 1 through 77 and 501 through
531.
The following lists show the message IDs for local and
global messages, any of which you can suppress by using the
-s option.
Message IDs per subprogram encountered:
1 Local Variable ____ may be used before it is defined
2 Local Variable ____ is declared but never used
3 Local Variable ____ is used but never defined
4 Local Variable ____ is defined but never used
5 Local Variable ____ is DATA-initialized but may be
redefined before used
6 Local Variable ____ is DATA-initialized but never used
7 Local Variable ____ is EQUIVALENCEd but never used
8 Multiword Variable ____ is EQUIVALENCEd but may overrun
its COMMON block partner
9 Module Local Variable is never used
10 Local Variable ____, IntSubPgm ____ overrides host version
11 No references to COMMON /____/
12 No references to the INCLUDEd COMMON /____/
13 COMMON /____/ is both INCLUDEd and explicitly declared
14 COMMON /____/ is both explicitly declared and available
via a MODULE
15 COMMON /____/ is never referenced in parent Module
21 Argument ____ is never used
22 CALL ____ has a different ArgCnt than previous CALL
encountered
23 Argument ____ is used as a dimension and is modified
24 Argument ____ has INTENT(OUT) but is neither written nor
passed
31 Warning: DO-Loop Index __ (line ___) is in COMMON
32 Warning: DO-Loop Index __ (line ___) is an Argument
33 Warning: DO-Loop Index __ (line ___) is a Module variable
41 No references to PARAMETER ____
42 No references to the INCLUDEd PARAMETER ____
43 No reference to the Module PARAMETER ____
51 Subprogram ____ has neither a RETURN nor a STOP statement
52 Subprogram ____ appears to not do anything
53 __ Unused label(s)
54 FUNCTION ____ side-effect: Argument(s) are written
55 FUNCTION ____ side-effect: COMMON Block(s) are written
57 Internal Subprogram ____ is never called
58 Duplicate SubPgm name ____
61 No references to Statement Function ____
62 Line ____ is not reachable
63 NAMELIST /____/ is never used
65 Cray Pointer/ee ____ may be used before it is defined
66 Cray Pointer/ee ____ is declared but never used
67 Cray Pointer/ee ____ is used but never defined
68 Cray Pointee ____ is defined but never used
69 Cray Pointee ____ is used but associated Pointer ____ not
defined
71 EQUIVALENCEd LocalVar ____ has same name as MODULE
variable
72 EQUIVALENCEd LocalVar ____ has same name as MODULE
ComBlk variable
73 No references to imported MODULE
74 No references to USEd Module
75 Module ____ USEd more than once
76 USEd Module ____ also imported into parent Module
77 Duplicate Module name ____
Message IDs for global call-chain concerns:
501 No callers
502 Argument count mismatch
503 Argument type mismatch
504 Expression passed as argument, Callee writes/passes
505 Expression passed as argument, Callee expects array
506 DO-Loop index sent as argument, Callee writes/passes it
507 Argument dimensionality mismatch
508 Duplicate argument sent, Callee writes/passes one
509 Argument sent from COMMON, Callee writes that COMMON
510 Possible hidden alias
511 COMMON Block length mismatch
512 COMMON block is never used
513 COMMON block is read-only
514 COMMON block is write-only
515 NAMELIST length mismatch
516 FUNCTION return value mismatch
517 F90 argument attribute mismatch
518 F90 caller: required explicit interface block missing
519 F90 dummy argument INTENT error
520 Subprogram needs RECURSIVE keyword
521 SUBROUTINE/FUNCTION CALL mismatch
522 Duplicate Subprogram name
523 Duplicate Module name
524 Argument (Subprogram) mismatch
525 Argument (Derived Type) mismatch
526 Possible argument (SUBROUTINE/FUNCTION) mismatch
527 Alternate ENTRY has no callers
528 Subprogram/Interface Block mismatch
529 Common block has multiple SubPgm DATA initializations
530 Argtype (Alternate-RETURN-label) mismatch
531 FUNCTION return value dimension mismatch
-V Prints version information to the stderr file.
file.f[90] [file .T]
Specifies the set of target Fortran source files and their
derived Compiler Information Files. Source file names can
be suffixed with either .f or .f90. When the .T file name
can be generated by replacing the .f or .f90 with a .T, you
do not have to specify the .T file name explicitly. The .f
and .f90 files must precede their corresponding .T files
specified.
These commands look for files named .ftnlintrc or .cflintrc in your
home directory and the current working directory; they concatenate
them (in that order); and they prepend the resulting string to the
command line options. The .ftnlintrc or .cflintrc file can contain
any combination of command line options, but a maximum of one
-o filename option is allowed. The .ftnlintrc or .cflintrc file
cannot contain file names. Newline characters are silently converted
to blanks. The command line options are processed left to right, so
options included in the .ftnlintrc or .cflintrc file can be
overridden.
ftnlint and cflint output is not designed to be used as input to other
tools.
These tools perform only limited analysis of subprograms that contain
syntax errors.
For more information about writing and using tools based on output
from an f90 compilation, see the Compiler Information File (CIF)
Reference Manual, publication SR-2401. SR-2401, a Cray Research
publication, contains information for UNICOS and UNICOS/mk systems
only.
These tools perform limited EQUIVALENCE analysis, which assumes that
if a local variable appears in an EQUIVALENCE statement, it is not
subject to analysis (for example, use before definition).
The ftnlint and cflint commands are a subset of the ftnlist(1) and
cflist(1) commands.
ENVIRONMENT VARIABLES [Toc] [Back] If the FTNLINTRC environment variable is set to OFF or the CFLINTRC
environment variable is set to OFF, all .ftnlintrc and .cflintrc files
are silently ignored.
The ftnlint and cflint commands return 0 on normal completion and
nonzero for abnormal termination.
ftnlint and cflint accept Fortran program source files that end in .F
or .F90, but some of the functionality described on this man page is
not present for files with .F and .F90 suffixes.
cflist(1), ftnlist(1), f90(1)
Compiler Information File (CIF) Reference Manual, publication SR-2401
SR-2401, a Cray Research publication, describes the CIF only for
UNICOS and UNICOS/mk systems.
This man page is available only online.
[ Back ]
|