* c-common.c (shorten_compare): Use force_fit_type directly.

From-SVN: r86004
This commit is contained in:
Nathan Sidwell 2004-08-14 17:54:36 +00:00
parent 1f59091c61
commit af9c665966
2 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2004-08-14 Nathan Sidwell <nathan@codesourcery.com>
* c-common.c (shorten_compare): Use force_fit_type directly.
2004-08-14 Gerald Pfeifer <gerald@pfeifer.com>
Dimitri Papadopoulos-Orfanos <papadopo@shfj.cea.fr>
Dave Korn <dk@artimi.com>
@ -1457,7 +1461,7 @@
* config/i386/xmmintrin.h: Include <mm_malloc.h>.
2004-08-03 H.J. Lu <hongjiu.lu@intel.com>
Tanguy Fautrà <tfautre@pandora.be>
Tanguy Fautrà <tfautre@pandora.be>
* config/i386/pmm_malloc.h: New file.

View File

@ -1997,10 +1997,14 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
if (TREE_TYPE (primop1) != *restype_ptr)
{
tree tmp = convert (*restype_ptr, primop1);
TREE_OVERFLOW (tmp) = TREE_OVERFLOW (primop1);
TREE_CONSTANT_OVERFLOW (tmp) = TREE_CONSTANT_OVERFLOW (primop1);
primop1 = tmp;
/* Convert primop1 to target type, but do not introduce
additional overflow. We know primop1 is an int_cst. */
tree tmp = build_int_2 (TREE_INT_CST_LOW (primop1),
TREE_INT_CST_HIGH (primop1));
TREE_TYPE (tmp) = *restype_ptr;
primop1 = force_fit_type (tmp, 0, TREE_OVERFLOW (primop1),
TREE_CONSTANT_OVERFLOW (primop1));
}
if (type != *restype_ptr)
{