This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/56574] False possibly uninitialized variable warning
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Mar 2013 10:43:45 +0000
- Subject: [Bug middle-end/56574] False possibly uninitialized variable warning
- Auto-submitted: auto-generated
- References: <bug-56574-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56574
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic, wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-03-11
Ever Confirmed|0 |1
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-11 10:43:45 UTC ---
ISO C99 6.5.13 says that 'value' is not evaluated when !flag is false. But
clearly we are not considering the "side-effect" of using an uninitialized
variable when deciding to output straight-line code sequences.
Affected are at least gimple SSA if-combine and eventually fold and
gimplification (I didn't check them).
Ok, for this testcase it is fold that ends up producing a TRUTH_AND_EXPR.
For SSA if-combine we should only linearize the code if all inner block
SSA (or memory - ugh) uses in
if (...)
{
<here>
if (...)
{
...
have a dominating definition.