]> git.ipfire.org Git - thirdparty/gcc.git/commit
2017-03-02 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Mar 2017 13:42:05 +0000 (13:42 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Mar 2017 13:42:05 +0000 (13:42 +0000)
commit4d2b9d1e3c794a05c00708035519290e920768e8
tree1ae9c4a7112cdf29926e13b25e432f7a93f48b81
parent895944316aad7cbee23b7f60c041a485ca0d0885
2017-03-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79345
PR c++/42000
* tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
param and abort the walk, returning -1 if it is hit.
(walk_aliased_vdefs): Take a limit param and pass it on.
* tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
defaulting to 0 and return a signed int.
* tree-ssa-uninit.c (struct check_defs_data): New struct.
(check_defs): New helper.
(warn_uninitialized_vars): Use walk_aliased_vdefs to warn
about uninitialized memory.

* fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
bogus uninitialized warning.
(fixed_convert_from_real): Likewise.

* g++.dg/warn/Wuninitialized-7.C: New testcase.
* c-c++-common/ubsan/bounds-2.c: Add -Wno-uninitialized.
* gcc.dg/uninit-pr19430-2.c: Add expected warning.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245840 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fixed-value.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/bounds-2.c
gcc/testsuite/g++.dg/warn/Wuninitialized-7.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/uninit-pr19430-2.c
gcc/tree-ssa-alias.c
gcc/tree-ssa-alias.h
gcc/tree-ssa-uninit.c