* fold-const.c (operand_equal_p): Handle ADDR_EXPR and TRUTH_NOT_EXPR.

From-SVN: r67683
This commit is contained in:
Jason Merrill 2003-06-09 18:42:33 -04:00 committed by Jason Merrill
parent 75b2a93c09
commit 1bfedcc8fb
2 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2003-06-09 Jason Merrill <jason@redhat.com>
* fold-const.c (operand_equal_p): Handle ADDR_EXPR and TRUTH_NOT_EXPR.
2003-06-19 Osku Salerma <osku@iki.fi>
* c-format.c (check_format_string, get_constant): New.

View file

@ -2000,9 +2000,19 @@ operand_equal_p (arg0, arg1, only_const)
}
case 'e':
if (TREE_CODE (arg0) == RTL_EXPR)
return rtx_equal_p (RTL_EXPR_RTL (arg0), RTL_EXPR_RTL (arg1));
return 0;
switch (TREE_CODE (arg0))
{
case ADDR_EXPR:
case TRUTH_NOT_EXPR:
return operand_equal_p (TREE_OPERAND (arg0, 0),
TREE_OPERAND (arg1, 0), 0);
case RTL_EXPR:
return rtx_equal_p (RTL_EXPR_RTL (arg0), RTL_EXPR_RTL (arg1));
default:
return 0;
}
default:
return 0;