fix alpha c++ failures

Richard Henderson rth@redhat.com
Sun Jul 8 12:31:00 GMT 2001


On Sun, Jul 08, 2001 at 01:56:54PM -0400, John David Anglin wrote:
> >               emit_cmp_and_jump_insns (new_index,
> > !                                      convert_modes (mode, imode,
> > !                                        expand_expr (new_bound, NULL_RTX,
> > !                                                     mode, 0),
> > !                                        unsignedp),
> 					   ^^^^^^^^^
> 
> Shouldn't this be `1'?  Consider the case where low and high are signed
> and high - low is negative.

I don't think so, but I'll be glad to be shown wrong.

If both are extended unsigned, then the values are in the range
0000...00ff.  If both are extended signed, then the values are in
the split range 0000...007f + ff80...ffff.  Either option works.

If, however, you extend one signed and one unsigned, then the 
values don't come from the same range and you get a garbage result.
Thus I believe NEW_BOUND must be extended as by UNSIGNEDP, since
that is presumably how NEW_INDEX was extended.


r~



More information about the Gcc-patches mailing list