summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-07-05 14:25:14 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-07-05 10:25:14 -0400
commit50b04185042881d21f0c856d9f5b0de4ccf72ffc (patch)
tree66ffa1c9315023f185000c1604377a7566498392 /gcc
parent8963a5172c0a91b190f361ef3b400518ee347a00 (diff)
downloadgcc-50b04185042881d21f0c856d9f5b0de4ccf72ffc.tar.gz
* tree-cfg.c (verify_expr): Use CHECK_OK in binary case.
From-SVN: r84114
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/tree-cfg.c24
2 files changed, 7 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c2dd100ed31..5ea730178f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+ * tree-cfg.c (verify_expr): Use CHECK_OK in binary case.
+
* function.c, langhooks-def.h, langhooks.h: Move max_size hook
to type hooks; remove bogus PARAMS.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 940df86bbac..4bf00dff375 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3151,7 +3151,9 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
if (TYPE_P (t))
*walk_subtrees = 0;
- /* Check operand N for being valid GIMPLE and give error MSG if not. */
+ /* Check operand N for being valid GIMPLE and give error MSG if not.
+ We check for constants explicitly since they are not considered
+ gimple invariants if they overflowed. */
#define CHECK_OP(N, MSG) \
do { if (TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (t, N))) != 'c' \
&& !is_gimple_val (TREE_OPERAND (t, N))) \
@@ -3300,24 +3302,8 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
- x = TREE_OPERAND (t, 0);
- /* We check for constants explicitly since they are not considered
- gimple invariants if they overflowed. */
- if (TREE_CODE_CLASS (TREE_CODE (x)) != 'c'
- && !is_gimple_val (x))
- {
- error ("Invalid operand to binary operator");
- return x;
- }
- x = TREE_OPERAND (t, 1);
- /* We check for constants explicitly since they are not considered
- gimple invariants if they overflowed. */
- if (TREE_CODE_CLASS (TREE_CODE (x)) != 'c'
- && !is_gimple_val (x))
- {
- error ("Invalid operand to binary operator");
- return x;
- }
+ CHECK_OP (0, "Invalid operand to binary operator");
+ CHECK_OP (1, "Invalid operand to binary operator");
break;
default: