[patch] expr.c: Return const0_rtx when expanding MODIFY_EXPR.
Kazu Hirata
kazu@cs.umass.edu
Tue Oct 19 13:04:00 GMT 2004
Hi,
Attached is a patch to have expand_expr_real_1 to return const0_rtx
when handling MODIFY_EXPR.
The patch makes the MODIFY_EXPR case consistent with the rest of
expand_expr_real_1 in that it returns const0_rtx when it has nothing
to return.
Tested on i686-pc-linux-gnu. Committed as preapproved by Roger Sayle.
Kazu Hirata
2004-10-19 Kazu Hirata <kazu@cs.umass.edu>
* expr.c (expand_expr_real_1) <MODIFY_EXPR>: Remove
unnecessary assignments to temp. Return const0_rtx.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.728
diff -u -p -r1.728 expr.c
--- expr.c 18 Oct 2004 21:18:23 -0000 1.728
+++ expr.c 19 Oct 2004 03:40:56 -0000
@@ -8067,8 +8067,6 @@ expand_expr_real_1 (tree exp, rtx target
tree lhs = TREE_OPERAND (exp, 0);
tree rhs = TREE_OPERAND (exp, 1);
- temp = 0;
-
gcc_assert (ignore);
/* Check for |= or &= of a bitfield of size one into another bitfield
@@ -8102,9 +8100,9 @@ expand_expr_real_1 (tree exp, rtx target
return const0_rtx;
}
- temp = expand_assignment (lhs, rhs, 0);
+ expand_assignment (lhs, rhs, 0);
- return temp;
+ return const0_rtx;
}
case RETURN_EXPR:
More information about the Gcc-patches
mailing list