fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
CHECK EQUIVALENCE
Syntax:
[DO NOT] CHECK EQUIVALENCE
Function:
fpt checks for two situations:
Mixed equivalence is an important issue when code is ported from one system to another. The most common cases are:
Implied equivalence is often accidental. If two different objects occupy the same location in a COMMON block, one will overwrite the other.
By default, fpt treats objects with a declared data size, for example declared as INTEGER*4 K, as distinct from objects in which the data size is inferred from the system defaults, declared for example as INTEGER K. The equivalence check may be instructed to ignore the distinction between defaulted and explicitly declared sizes by the command EQUIVALENCE CHECK TO IGNORE DEFAULT SIZES.
Where to Use this Command
Operating system command line | Yes |
Configuration file, config.fsp | Yes |
Specification (fsp) files, *.fsp | Yes |
Interactively, to FPT> prompt | Yes |
Interactive command files | Yes |
Embedded in the Fortran code | Yes |
Default
The equivalence check is not carried out by default (Note that defaults may be changed in the configuration file).
Examples
Interactive use:
FPT> check equiv
fpt reports:
EQUIVALENCE Check ================= Check of COMMON Blocks ---------------------- COMMON TESS ----------- Implied EQUIVALENCE Name Sub-prog/Struct Use/COMMON Address Type Size Bounds ---- --------------- ---------- ------- ---- ---- ------ VERT TRIAD TESS 100 REAL *4 df (1:5,1:5) DEVIAT SIMPLX TESS 100 REAL *4 df SSQ SIMPLX TESS 104 REAL *4 df (1:5) ******************** Check of Local Variables for Mixed EQUIVALENCE ---------------------------------------------- Mixed type, mixed size or mis-aligned EQUIVALENCE Name Sub-prog/Struct Use/COMMON Address Type Size Bounds ---- --------------- ---------- ------- ---- ---- ------ UD TRIAD Local DOUBLE PRECISION *8 df UR TRIAD Local REAL *4 df ******************** -------------------------------------------------------------- EQUIVALENCE Check Total number of mixed or implied EQUIVALENCE (Warnings): 2 --------------------------------------------------------------
See Also
EQUIVALENCE CHECK DEFAULT SIZES
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.