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 middle-end/56574] False possibly uninitialized variable warning


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.


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