aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-04-01 12:45:02 -0800
committerRichard Henderson <rth@gcc.gnu.org>2004-04-01 12:45:02 -0800
commit6407bc6703d1a33e231e73faabffb6ba2e15ce8d (patch)
tree5efbbd81037c2b7cc8dfa82daa715f56b0d77fb7 /gcc/cp/typeck2.c
parent54fdc910cf23c0f0c658db8f9d9e30f006e97513 (diff)
downloadgcc-6407bc6703d1a33e231e73faabffb6ba2e15ce8d.zip
gcc-6407bc6703d1a33e231e73faabffb6ba2e15ce8d.tar.gz
gcc-6407bc6703d1a33e231e73faabffb6ba2e15ce8d.tar.bz2
re PR c++/14804 ([unit-at-a-time] initializing const data with reinterpret_cast-ed pointer-to-member function crashes)
PR c++/14804 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often. * typeck2.c (split_nonconstant_init): Clear TREE_READONLY. From-SVN: r80318
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 6314456..0a0fdbc 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);