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: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Jun 2014 07:55:28 +0000
- Subject: [Bug middle-end/56574] False possibly uninitialized variable warning
- Auto-submitted: auto-generated
- References: <bug-56574-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56574
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |
CC| |ebotcazou at gcc dot gnu.org
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> 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.
But evaluating an uninitialized variable is not a side-effect, unless accessing
the variable itself has a side-effect, so there is no wrong code here.
> 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.
This analysis looks bogus to me.