Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Static verifier error messages

wkramer
Beginner
680 Views

Hello,

I just ran the static verifier on a program I have been using for years without any problem and was presented with 415 errors.

The bulk of these errors are related toallocatable variables made available through a use statement.

The allocatable variables are declared in a module with the SAVE attribute. On initialisation of the program all these variables are allocated and made available through use statement.

For some reason the static verifier complains, in all routines that use these allocated variables, about inconsistent declaration. For example:

[SV] inconsistent declaration of record "RDDED" (wrong type)

I this really improper coding?

Another thing is that the static verifier complains about uninitialized character strings that have been initialized through an internal write statement. This happens only now and then, so I can live with that.

Also the static verifier complains about functions be called as subroutine ([SV] function "UPCASE" is called as subroutine), where the function is called as:

integer

function CheckForDuplicateMRU(szNewItem)

implicit none

character(len=*), intent(in) :: szNewItem

character(len=MAX_PATH) :: Upcase

integer(4) :: i

do i=1,MRUcount

if (Upcase(szNewItem)==Upcase(MRUstr(i))) then

CheckForDuplicateMRU=i

return

endif

enddo

CheckForDuplicateMRU=NotFound

end function

CheckForDuplicateMRU

Is this also a coding error?

Regards,

Walter Kramer

0 Kudos
2 Replies
Steven_L_Intel1
Employee
680 Views
Based on your descriptions (you didn't show code for the first case), I would say that it is Static Verifier that is in error. If you can provide a complete test case, I'd appreciate it if you'd submit one (or more) to Intel Premier Support so that we can use them to help improve SV.
0 Kudos
wkramer
Beginner
680 Views

Hello Steve,

I was wrong about the faulty error detection with internal write. I submitted an issue at premier support for the other two(supposedly) wrong types of error detection.

Regards,

Walter Kramer

0 Kudos
Reply