------- Comment #6 from rguenth at gcc dot gnu dot org  2006-09-02 10:15 -------
The problem is, that for

i_1: VARYING
size_3: VARYING
i_4: ~[0, 0]  EQUIVALENCES: { } (0 elements)
i_5: [-INF, -1]  EQUIVALENCES: { i_6 i_7 } (2 elements)
i_6: ~[0, 0]  EQUIVALENCES: { i_7 } (1 elements)
i_7: [0, size_3 - 1]  EQUIVALENCES: { i_1 } (1 elements)

i_5 contains VRs in the equivalences set that are not compatible (i_7).
fix_equivalence_set is supposed to prevent that, but somehow it doesn't.

Simplified testcase:

void code_comment (int size)
{
  int i;
  for (i = 0; i < size; i++)
    if (i)
      if (i < 0)
        if (i < 0)
          return;
}

the problem seems to be that [0, size-1] is not removed because it is a
symbolic range.  Still it can never overlap with [-INF, -1].

I think that this "fixing" of equivalence sets is very fragile in the
presence of symbolic ranges in the equivalence set, but I have a patch
that handles the above case.


-- 


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

Reply via email to