summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-20 18:13:56 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-20 18:13:56 +0000
commit43788075a5fcdf115de8ca7b0ee91fd68d998529 (patch)
tree59a1a32f0ecc1e856d08b15d3921d000019c27c2 /gcc/gimplify.c
parentb0925346737c20b000f28ff296ef6757d93bac36 (diff)
downloadgcc-43788075a5fcdf115de8ca7b0ee91fd68d998529.tar.gz
PR middle-end/55750
* gimplify.c (gimplify_self_mod_expr): Don't force lvalue to pass is_gimple_min_lval. * gcc.c-torture/execute/pr55750.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index f628b8ab3c0..e79d06397e0 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2391,25 +2391,15 @@ gimplify_self_mod_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
rhs = TREE_OPERAND (*expr_p, 1);
/* For postfix operator, we evaluate the LHS to an rvalue and then use
- that as the result value and in the postqueue operation. We also
- make sure to make lvalue a minimal lval, see
- gcc.c-torture/execute/20040313-1.c for an example where this matters. */
+ that as the result value and in the postqueue operation. */
if (postfix)
{
- if (!is_gimple_min_lval (lvalue))
- {
- mark_addressable (lvalue);
- lvalue = build_fold_addr_expr_loc (input_location, lvalue);
- gimplify_expr (&lvalue, pre_p, post_p, is_gimple_val, fb_rvalue);
- lvalue = build_fold_indirect_ref_loc (input_location, lvalue);
- }
ret = gimplify_expr (&lhs, pre_p, post_p, is_gimple_val, fb_rvalue);
if (ret == GS_ERROR)
return ret;
- }
- if (postfix)
- lhs = get_initialized_tmp_var (lhs, pre_p, NULL);
+ lhs = get_initialized_tmp_var (lhs, pre_p, NULL);
+ }
/* For POINTERs increment, use POINTER_PLUS_EXPR. */
if (POINTER_TYPE_P (TREE_TYPE (lhs)))