Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

uninit check failed

SCHWOERTZIG_T_
Beginner
773 Views

Hi,

I am wondering why uninit check does not detect uninit variable in the following program. Is there a way to detect such situations ?

       PROGRAM UNINIT_FAILED
       IMPLICIT NONE
       INTEGER VAR
         CALL DO_NOTHING(VAR)
         VAR=VAR+0
         print *, "VAR=", VAR
       END
 
       SUBROUTINE DO_NOTHING(MYVAR)
       IMPLICIT NONE
       INTEGER MYVAR
         RETURN
       END

Thank you very much for your help.

Thierry

0 Kudos
2 Replies
Steven_L_Intel1
Employee
773 Views
The compiler's run-time uninitialized variable checking is quite limited, unfortunately. It checks static, local scalars only and does not do cross-routine checking. Your error would be caught by the Static Analysis feature of Intel Fortran Studio XE, however. capture.png
0 Kudos
SCHWOERTZIG_T_
Beginner
773 Views
Thank you very much for your help. Thierry
0 Kudos
Reply