This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20520] allocatable arrays used uninitialized without a warning
- From: "tobi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2005 18:14:18 -0000
- Subject: [Bug fortran/20520] allocatable arrays used uninitialized without a warning
- References: <20050317173138.20520.ebertakis@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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