summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-10-19 19:54:06 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-10-19 15:54:06 -0400
commit03bf2c237c6288caef6e014895f989f963b9f711 (patch)
treeeb97caf1841ebd1fecf7e7517af209b7ec0318b7 /gcc/expr.c
parent91ea4f8ddfb30a1274e951d43ac4d79eb5c63e9e (diff)
downloadgcc-03bf2c237c6288caef6e014895f989f963b9f711.tar.gz
langhooks.h (LANG_HOOKS_HONOR_READONLY): New macro.
* langhooks.h (LANG_HOOKS_HONOR_READONLY): New macro. * toplev.h (struct lang_hooks): New field HONOR_READONLY. * emit-rtl.c (set_mem_attributes): Set RTX_UNCHANGING_P from TREE_READONLY and TYPE_READONLY if lang_hooks.honor_readonly. Set alignment from type if INDIRECT_REF. (adjust_address_1, offset_address): Simplify alignment compuitation. * expr.c (expand_expr, case INDIRECT_REF): Don't set RTX_UNCHANGING_P here; done by set_mem_attributes. From-SVN: r46361
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index f486b32e4fd..3290b39496d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6812,13 +6812,6 @@ expand_expr (exp, target, tmode, modifier)
temp = gen_rtx_MEM (mode, op0);
set_mem_attributes (temp, exp, 0);
- /* It is incorrect to set RTX_UNCHANGING_P from TREE_READONLY
- here, because, in C and C++, the fact that a location is accessed
- through a pointer to const does not mean that the value there can
- never change. Languages where it can never change should
- also set TREE_STATIC. */
- RTX_UNCHANGING_P (temp) = TREE_READONLY (exp) & TREE_STATIC (exp);
-
/* If we are writing to this object and its type is a record with
readonly fields, we must mark it as readonly so it will
conflict with readonly references to those fields. */