This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20441] -finit-local-zero is missing from gfortran
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2006 16:02:47 -0000
- Subject: [Bug fortran/20441] -finit-local-zero is missing from gfortran
- References: <bug-20441-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from burnus at gcc dot gnu dot org 2006-11-27 16:02 -------
> > Besides zero initialization [...] a initialization to a (signaling) NaN (for
> > complex, real) would be also nice to find uninitialized variables.
>
> Why use -Wuninitialize will warn about those cases (though it can produce some
> false positives).
-Wuninitialize does not always work (false negative). Or how do you expect a
compiler to find the problem in such cases:
real :: r
call myFunc(r, .true.)
contains
subroutine myFunc(r,l)
real, intent(inout) :: r
logical :: l
if(l) then
r = r**2
else
r = 5
end if
end subroutine
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20441