[Bug fortran/20520] allocatable arrays used uninitialized without a warning
tobi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Mar 20 18:14:00 GMT 2005
------- Additional Comments From tobi at gcc dot gnu dot org 2005-03-20 18:14 -------
real,allocatable:: a(:),b(:)
real::x
a(1)=2*b(1) + x
end
This only gives an "uninitialized" warning for x, but not for a or b:
[tobi@marktplatz tests]$ gfortran -O -Wuninitialized pr20521.f90
pr20521.f90: In function ÂMAIN__Â:
pr20521.f90:3: warning: Âx is used uninitialized in this function
So it looks like diagnostics for allocatable arrays are fairly weak.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|allocatable arrays used |allocatable arrays used
|without being allocated |uninitialized without a
|without a warning |warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20520
More information about the Gcc-bugs
mailing list