aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 53d5889..adaa9ab 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2507,6 +2507,12 @@ build1 (code, type, node)
TREE_READONLY (t) = 0;
break;
+ case INDIRECT_REF:
+ /* Whether a dereference is readonly has nothing to do with whether
+ its operand is readonly. */
+ TREE_READONLY (t) = 0;
+ break;
+
default:
if (TREE_CODE_CLASS (code) == '1' && node && TREE_CONSTANT (node))
TREE_CONSTANT (t) = 1;