[Bug middle-end/32395] false positive warning about use of uninitialized variable.

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Feb 1 17:56:00 GMT 2008



------- Comment #16 from manu at gcc dot gnu dot org  2008-02-01 17:55 -------
Somehow after SRA we end up creating a PHI node with an empty definition:



 # BLOCK 5 freq:2931, starting at line 7057
  # PRED: 276 [98.0%]  (true,exec) 3 [98.0%]  (true,exec)
  # inf$sideD.88720_393 = PHI <inf$sideD.88720_1256(276),
inf$sideD.88720_1476(D)(3)>

This node comes from the end of BB 3:

  # MPT.561D.88709_1630 = VDEF <MPT.561D.88709_1629> { MPT.561D.88709 }
  [pr32395-0.ii : 26871] thisD.73371_2(D)->node_countD.70698 = 0;
  # VUSE <MPT.561D.88709_1630> { MPT.561D.88709 }
  [pr32395-0.ii : 27027] hint$nodeD.85841_101 =
D.84656_69->D.70734.memberD.68890;
  [pr32395-0.ii : 26876] if (last$_M_currentD.85838_10 !=
first$_M_currentD.85837_463)
    goto <bb 5>;
  else
    goto <bb 285>;
  # SUCC: 5 [98.0%]  (true,exec) 285 [2.0%]  (false,exec)

I really cannot see in this huge testcase how we end up building this. However,
not even after all passes we remove the uninitialized use (and the edges going
to the block have a rather high probability). So, this is does not seem a bug,
just a case were GCC is not smart enough. More optimizations, more cases we
could catch. We will never catch them all. I would call it a Halting Problem
case and suspend it (probably add it with xfail to the testsuite).  ;-)

That it worked before just shows a possible optimisation regression with
respect to this code. But in such a huge testcase, it is hard to see what
regressed.


-- 


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



More information about the Gcc-bugs mailing list