[patch] Deal with larger anti-ranages in compare_range_with_value

Tom Truscott trt@unx.sas.com
Wed Jul 27 17:48:00 GMT 2005


Somewhat related to this (EQ/NE working the same way,
it looks like the ordinary-range NE test is missing
the case of [p,p] != q  detected by compare_values (p,q) returning +2

Perhaps the EQ_EXPR and NE_EXPR code on approx lines 1714..1747
could be merged.  Change the separate ifs into:

  if (comp == EQ_EXPR || comp == NE_EXPR)
    {
      ...
          if (cmp == 0)
            return comp == EQ_EXPR ? boolean_true_node : boolean_false_node;

and so on.

Tom Truscott



More information about the Gcc-patches mailing list