This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/20520] allocatable arrays used uninitialized without a warning


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]