Static verification analyzes Fortran source code and checks for various kinds of errors, warnings, and/or debatable points in user program.
Static verification detects issues with the following:
The following example illustrates Fortran-specific analysis.
Example 1: Undefined function result
File dlarnd.f contains the following lines:
2 REAL*8 FUNCTION DLARND( IDIST, ISEED )
. . .
82 T1 = DLARAN( ISEED )
84 IF( IDIST.EQ.1 ) THEN
88 DLARND = T1
89 ELSE IF( IDIST.EQ.2 ) THEN
93 DLARND = TWO*T1 - ONE
94 ELSE IF( IDIST.EQ.3 ) THEN
98 T2 = DLARAN( ISEED )
99 DLARND = SQRT( -TWO*LOG( T1 ) )*COS( TWOPI*T2 )
100 END IF
101 RETURN
105 END
Static verification issues the following message:
dlarnd.f(105): warning #12077: possibly function result is not set