Interprocedural Analysis

Static verification detects inconsistent object declarations in different program units, for example:

The following examples illustrate interprocedural analysis.

Example 1: Wrong type

File config1.c contains the following line:

31    int extraSpace , pad , height , width , rows , bot , top , trow ;

File dimbox.c contains the following line:

13    char **rows ;

Static verification issues the following message:

dimbox.c(13): error #12090: variable "rows" declared inconsistently (wrong type). See (file:config1.c line:31)

Example 2: Wrong number of arguments

File controlf.c contains function declaration in the following line:

controlf()

File uloop2.c contains the following line:

65     fds = controlf( 1 ) ;

Static verification issues the following message:

uloop2.c(65): error #12020: wrong number of arguments

Example 3: Wrong type of procedure argument

File lapak.f90 contains the following:

8759     SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )

                    . . .

8771     INTEGER            IPIV( * )

File bifgel.f90 contains the following:

778     Subroutine CMAN2(W, N, NW, Omega, H20, H11, W20, W11, WK, ier)

779     Implicit Real*8 (A-H,O-Z)

                . . .

782     Dimension W(*), H11(N), W11(N), WK(N)               . . .

840     Call Zgetrs ('N', N, 1, W(Lac), N, WK, W20, N, info)

Static verification issues the following message:

bifgel.f90(840): error #12040: argument 6 doesn't conform to dummy argument. See (file:lapak.f90 line:8759)