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 tree-optimization/63748] [4.9/5 Regression] may be used uninitialized warning on variable definition with initializer


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63748

--- Comment #4 from Ulrich Weigand <uweigand at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> I think this is hard warning to avoid in the compiler as we don't know if
> foo calls longjmp or not.  Note we don't know if alloc_jmp_buf does a push
> somewhere else.

Huh?  No matter what, "buf" is in fact never used uninitialized in this
function, and that should be trivial to see; the only use of "buf" occurs in
line 17 immediately after the definition of "buf" in line 16, whether any
longjmp is ever called or not.

Also, if any of the gotos in this function is removed, the warning disappears. 
The problem seems to be related to some call-graph optimizations (note that the
if (noside) check is partially redundant).


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