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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-18 
15:43:33 UTC ---
Apparently the second vrp pass incorrectly optimizes away the
if (Token.empty ()) continue;
test.

We have:

...
  Split$Length_126 = MIN_EXPR <Idx_44, Desc$Length_99>;
  if (Split$Length_126 == 0)
    goto <bb 17>;
  else
    goto <bb 9>;

<bb 9>:
  # Split$16$Length_97 = PHI <Split$16$Length_43(8)>
  # Split$16$Data_98 = PHI <Split$16$Data_45(8)>
  # Desc$Data_133 = PHI <Desc$Data_101(8)>
  # Split$Length_51 = PHI <Split$Length_126(8)>
...

in *.reassoc2.

*.vrp2 says:
Split$Length_24: ~[0, 0]  EQUIVALENCES: { Split$Length_126 } (1 elements)
Idx_44: VARYING
Split$Length_51: ~[0, 0]  EQUIVALENCES: { Split$Length_126 } (1 elements)
Desc$Length_99: VARYING
Split$Length_126: ~[0, 0]
...
Folding predicate Split$Length_126 == 0 to 0

Idx_44 and Desc$Length_99 are correctly VARYING, and it is correct
that Split$Length_51 is ~[0, 0], but it isn't equivalent to Split$Length_126
in the sense that it has to have the exact same value range.

Reply via email to