This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/42145] Incorrect "may be used uninitialized warning" for a very specific test case
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Dec 2009 16:59:18 -0000
- Subject: [Bug regression/42145] Incorrect "may be used uninitialized warning" for a very specific test case
- References: <bug-42145-18346@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from manu at gcc dot gnu dot org 2009-12-30 16:59 -------
This would need conditional PHIs, so a duplicate of PR20968.
GCC never detects that ret is always initialized, it doesn't warn because at
low optimization levels we do not warn for PHIs or because CCP (PR18501) just
initializes the variable (probably to 1 or 10). There is some differences
between the dumps of -O1 and -O2 in the way the logical or is transformed int
bitwise-or and how dom1 deals with each of them, but I cannot tell if there is
some missing optimization involved.
*** This bug has been marked as a duplicate of 20968 ***
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145