summaryrefslogtreecommitdiffstats
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-01 20:45:02 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-01 20:45:02 +0000
commit09742c66dea678543aa0662522b82978c8c58f91 (patch)
tree5efbbd81037c2b7cc8dfa82daa715f56b0d77fb7 /gcc/cp/typeck2.c
parentc8fe098d028c490b950ff77ca9a61b90ee757588 (diff)
downloadppe42-gcc-09742c66dea678543aa0662522b82978c8c58f91.tar.gz
ppe42-gcc-09742c66dea678543aa0662522b82978c8c58f91.zip
PR c++/14804
* decl.c (cp_finish_decl): Preserve TREE_READONLY more often. * typeck2.c (split_nonconstant_init): Clear TREE_READONLY. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80318 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 63144565e48..0a0fdbc0311 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -380,6 +380,7 @@ split_nonconstant_init (tree dest, tree init)
code = build1 (STMT_EXPR, void_type_node, code);
TREE_SIDE_EFFECTS (code) = 1;
DECL_INITIAL (dest) = init;
+ TREE_READONLY (dest) = 0;
}
else
code = build (INIT_EXPR, TREE_TYPE (dest), dest, init);
OpenPOWER on IntegriCloud