aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-07-25 08:36:42 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-07-25 08:36:42 -0400
commitb60334e840e077c460eb5e9a08f990c9844f2a48 (patch)
tree330b8ecf9fe3d92d28c1f18f29dfc25744a5cbae /gcc
parent2d59d98e014a64f5a48cbb3033f25896b2d9ab79 (diff)
downloadgcc-b60334e840e077c460eb5e9a08f990c9844f2a48.zip
gcc-b60334e840e077c460eb5e9a08f990c9844f2a48.tar.gz
gcc-b60334e840e077c460eb5e9a08f990c9844f2a48.tar.bz2
(expand_expr, case MODIFY_EXPR): Don't preexpand calls if LHS is an
indirect via a constant pointer. From-SVN: r14527
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 1cfb453..8db37e0 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