(operand_equal_p): Constants are not equal if there has been an overflow.

From-SVN: r13949
This commit is contained in:
Richard Kenner 1997-04-20 21:27:07 -04:00
parent 116758a727
commit 3c9b009121

View File

@ -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),