On Wed, Oct 02, 2013 at 10:50:21AM -0700, Cong Hou wrote:
> >> +  if (int_cst_value (p11.offset) != int_cst_value (p21.offset))
> >> +    return int_cst_value (p11.offset) < int_cst_value (p21.offset);
> >
> > This is going to ICE whenever the offsets wouldn't fit into a
> > HOST_WIDE_INT.
> >
> > I'd say you just shouldn't put into the vector entries where offset isn't
> > host_integerp, those would never be merged with other checks, or something
> > similar.
> 
> Do you mean I should use widest_int_cst_value()? Then I will replace
> all int_cst_value() here with it. I also changed the type of "diff"
> variable into HOST_WIDEST_INT.

Actually, best would be just to use
tree_int_cst_compare (p11.offset, p21.offset)
that will handle any INTEGER_CSTs, not just those that fit into HWI.

        Jakub

Reply via email to