This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/81782] [7/8 Regression] Yet another -Wmaybe-uninitialized false positive with empty array
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Aug 2017 12:20:37 +0000
- Subject: [Bug middle-end/81782] [7/8 Regression] Yet another -Wmaybe-uninitialized false positive with empty array
- Auto-submitted: auto-generated
- References: <bug-81782-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81782
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |7.2
Summary|Yet another |[7/8 Regression] Yet
|-Wmaybe-uninitialized false |another
|positive with empty array |-Wmaybe-uninitialized false
| |positive with empty array
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with
commit 4d2b9d1e3c794a05c00708035519290e920768e8
Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Mar 2 13:42:05 2017 +0000
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