mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-26 12:19:46 +08:00
(operand_equal_p): Constants are not equal if there has been an overflow.
From-SVN: r13949
This commit is contained in:
parent
116758a727
commit
3c9b009121
@ -1759,11 +1759,16 @@ operand_equal_p (arg0, arg1, only_const)
|
||||
switch (TREE_CODE (arg0))
|
||||
{
|
||||
case INTEGER_CST:
|
||||
return (TREE_INT_CST_LOW (arg0) == TREE_INT_CST_LOW (arg1)
|
||||
return (! TREE_CONSTANT_OVERFLOW (arg0)
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& TREE_INT_CST_LOW (arg0) == TREE_INT_CST_LOW (arg1)
|
||||
&& TREE_INT_CST_HIGH (arg0) == TREE_INT_CST_HIGH (arg1));
|
||||
|
||||
case REAL_CST:
|
||||
return REAL_VALUES_EQUAL (TREE_REAL_CST (arg0), TREE_REAL_CST (arg1));
|
||||
return (! TREE_CONSTANT_OVERFLOW (arg0)
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& REAL_VALUES_EQUAL (TREE_REAL_CST (arg0),
|
||||
TREE_REAL_CST (arg1)));
|
||||
|
||||
case COMPLEX_CST:
|
||||
return (operand_equal_p (TREE_REALPART (arg0), TREE_REALPART (arg1),
|
||||
|
Loading…
Reference in New Issue
Block a user