fold-const.c (ptr_difference_const): Use cst_and_fits_in_hwi instead of host_integerp.

* fold-const.c (ptr_difference_const): Use
	cst_and_fits_in_hwi instead of host_integerp.

From-SVN: r103436
This commit is contained in:
Zdenek Dvorak 2005-08-24 09:53:42 +02:00 committed by Zdenek Dvorak
parent 14a07c9282
commit 87de2376fd
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-08-24 Zdenek Dvorak <dvorakz@suse.cz>
* fold-const.c (ptr_difference_const): Use
cst_and_fits_in_hwi instead of host_integerp.
2005-08-24 Paolo Bonzini <bonzini@gnu.org>
* config/darwin.c (gen_pic_offset): New.

View File

@ -11759,10 +11759,10 @@ ptr_difference_const (tree e1, tree e2, HOST_WIDE_INT *diff)
toffset2 = fold_convert (type, toffset2);
tdiff = fold_build2 (MINUS_EXPR, type, toffset1, toffset2);
if (!host_integerp (tdiff, 0))
if (!cst_and_fits_in_hwi (tdiff))
return false;
*diff = tree_low_cst (tdiff, 0);
*diff = int_cst_value (tdiff);
}
else if (toffset1 || toffset2)
{