[Bug tree-optimization/60165] "may be used uninitialized" warning with -O3 but not with -O2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 13 08:23:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60165
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't see anything strange on it, -Wmaybe-uninitialized is a middle-end
warning and as such very much depends on the optimizations, there is no
guarantee you get the same warnings between different optimization levels,
whether something is found as potentially uninitialized depends heavily e.g. on
inlining, tail recursion etc. In this case at -O3 the function is first
inlined into itself a small amount of times. I don't see anything wrong to
warn here, given that the variable indeed is not initialized in some code paths
(if fn2 returns zero).
More information about the Gcc-bugs
mailing list