aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>1997-07-25 12:36:42 +0000
committerRichard Kenner <kenner@vlsi1.ultra.nyu.edu>1997-07-25 12:36:42 +0000
commit1d363175b70f42f7faee425fc0e8281c44079e06 (patch)
tree330b8ecf9fe3d92d28c1f18f29dfc25744a5cbae
parent00bd41461ef239cbd6c95e478dd05ae1c4466b86 (diff)
(expand_expr, case MODIFY_EXPR): Don't preexpand calls if LHS is an
indirect via a constant pointer. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@14527 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 1cfb4538a2e..8db37e00562 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6861,7 +6861,9 @@ expand_expr (exp, target, tmode, modifier)
if (TREE_CODE (lhs) != VAR_DECL
&& TREE_CODE (lhs) != RESULT_DECL
- && TREE_CODE (lhs) != PARM_DECL)
+ && TREE_CODE (lhs) != PARM_DECL
+ && ! (TREE_CODE (lhs) == INDIRECT_REF
+ && TYPE_READONLY (TREE_TYPE (TREE_OPERAND (lhs, 0)))))
preexpand_calls (exp);
/* Check for |= or &= of a bitfield of size one into another bitfield