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 tree-optimization/35609] [4.3/4.4 Regression] "is used uninitialized in this function" should be may warning



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-03-16 21:32 -------
The warning works as designed, the PHI node in question that causes the
warning only has a single incoming edge:

testfunc ()
{
  int alt_reloc;
  int foo.0;

<bb 2>:
  foo.0_1 = foo;
  if (foo.0_1 > 19)
    goto <bb 5>;
  else
    goto <bb 3>;

<bb 3>:
  if (foo.0_1 > 9)
    goto <bb 6>;
  else
    goto <bb 4>;

<bb 4>:
  if (alt_reloc_4(D) != 0)
    goto <bb 5>;
  else
    goto <bb 6>;

<bb 5>:
  bar = 42;

<bb 6>:
  return;

}

we don't check whether the uninitialized use post-dominates the function
entry.  I don't know if we should.

This is just a case of 4.3 optimizing better than 4.2 which makes the
warning less precise.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-16 21:32:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35609


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