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

Static verifier reports error for OPEN and CLOSE statements

Christer
Beginner
465 Views
I have tested the Static verifier as one step before final release of one program.
The setting I have used is "All Errors (/Qdiag-enable:sv2) in Fortran->Diagnostic
Fortran version is 11.0.066.

The result is a lot off errors and many of them are useful but some of them are hard to understand for me. The program I have compiled is pretty old and some parts I have not touched. The program is using a lot of files with many open and close statements and I receive errors for almost all these statements:
Example:

error #12145: [SV] function "open" is called as subroutine

for statement:
open(166,file='log_GTMap.txt')

and
error #12145: [SV] function "close" is called as subroutine
for line
close (166)

Tthis is defined as an error, I am a little confused, is this correct?


It is also disturbing ascan be hard to see the real problems.

Christer

0 Kudos
2 Replies
ArturGuzik
Valued Contributor I
465 Views
Quoting - Christer
It is also disturbing ascan be hard to see the real problems.

Christer

SV has many issues like that. Many false (positive) warnings. It (in my view) can be used as warning system, although many of them are false.

Your open and close statements look OK. Code was working, wasn't it?

A.
0 Kudos
Christer
Beginner
465 Views
Quoting - ArturGuzik

SV has many issues like that. Many false (positive) warnings. It (in my view) can be used as warning system, although many of them are false.

Your open and close statetement look OK. Code was working, wasn't it?

A.

Thanks for your reply,
Yes the code is working (and it has for many years as this part is old) It was one of my first experiencewith SV so Ibecame alittle frightened when I saw all these lines of errors appearing...
0 Kudos
Reply