Commit af9c6659 by Nathan Sidwell

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

From-SVN: r86004
parent 1f59091c
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> 2004-08-14 Gerald Pfeifer <gerald@pfeifer.com>
Dimitri Papadopoulos-Orfanos <papadopo@shfj.cea.fr> Dimitri Papadopoulos-Orfanos <papadopo@shfj.cea.fr>
Dave Korn <dk@artimi.com> Dave Korn <dk@artimi.com>
...@@ -1457,7 +1461,7 @@ ...@@ -1457,7 +1461,7 @@
* config/i386/xmmintrin.h: Include <mm_malloc.h>. * config/i386/xmmintrin.h: Include <mm_malloc.h>.
2004-08-03 H.J. Lu <hongjiu.lu@intel.com> 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. * config/i386/pmm_malloc.h: New file.
......
...@@ -1997,10 +1997,14 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr, ...@@ -1997,10 +1997,14 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
if (TREE_TYPE (primop1) != *restype_ptr) if (TREE_TYPE (primop1) != *restype_ptr)
{ {
tree tmp = convert (*restype_ptr, primop1); /* Convert primop1 to target type, but do not introduce
TREE_OVERFLOW (tmp) = TREE_OVERFLOW (primop1); additional overflow. We know primop1 is an int_cst. */
TREE_CONSTANT_OVERFLOW (tmp) = TREE_CONSTANT_OVERFLOW (primop1); tree tmp = build_int_2 (TREE_INT_CST_LOW (primop1),
primop1 = tmp; 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) if (type != *restype_ptr)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment