[Bug fortran/27589] New: Add compiler flag to check for uninitalized values at runtime
tobias dot burnus at physik dot fu-berlin dot de
gcc-bugzilla@gcc.gnu.org
Sat May 13 14:12:00 GMT 2006
Currently, gfortran does not seem to have any option to catch uninitialized
variables at run time.
Example (from http://www.polyhedron.com/pb05/linux/diagnose.html):
--------<UNIN1>------------
program uin1
integer x,y,a,b
x=y
a=b
print *,x,a
b=1
end
---------------------------
Other compilers have an options to catch those, e.g.:
ifort64-9.1 -C -check all -warn all,nodec,interfaces -gen_interfaces -traceback
-fpe0 -fpstkchk UIN1.F
./a.out
forrtl: severe (193): Run-Time Check Failure. The variable 'uin1_$Y' is being
used without being defined
NAG: f95 -C=all -C=undefined -info -g -gline UIN1.F
./a.out
Reference to undefined variable Y
Program terminated by fatal error
In UIN1, line 5 of UIN1.F
--
Summary: Add compiler flag to check for uninitalized values at
runtime
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tobias dot burnus at physik dot fu-berlin dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27589
More information about the Gcc-bugs
mailing list