summaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 06:41:07 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 06:41:07 +0000
commit4ee9c6840ad3fc92a9034343278a1e476ad6872a (patch)
treea2568888a519c077427b133de9ece5879a8484a5 /gcc/cp/rtti.c
parentebb338380ab170c91e64d38038e6b5ce930d69a1 (diff)
downloadgcc-4ee9c6840ad3fc92a9034343278a1e476ad6872a.tar.gz
Merge tree-ssa-20020619-branch into mainline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 9e7805651ce..ac149c8c91b 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -231,7 +231,7 @@ get_tinfo_decl_dynamic (tree exp)
/* The RTTI information is at index -1. */
index = build_int_2 (-1 * TARGET_VTABLE_DATA_ENTRY_DISTANCE, -1);
t = build_vtbl_ref (exp, index);
- TREE_TYPE (t) = type_info_ptr_type;
+ t = convert (type_info_ptr_type, t);
}
else
/* Otherwise return the type_info for the static type of the expr. */
@@ -797,7 +797,6 @@ tinfo_base_init (tree desc, tree target)
size_binop (MULT_EXPR,
size_int (2 * TARGET_VTABLE_DATA_ENTRY_DISTANCE),
TYPE_SIZE_UNIT (vtable_entry_type)));
- TREE_CONSTANT (vtable_ptr) = 1;
TINFO_VTABLE_DECL (desc) = vtable_ptr;
}
@@ -807,7 +806,9 @@ tinfo_base_init (tree desc, tree target)
init = tree_cons (NULL_TREE, decay_conversion (name_decl), init);
init = build_constructor (NULL_TREE, nreverse (init));
- TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
+ TREE_CONSTANT (init) = 1;
+ TREE_INVARIANT (init) = 1;
+ TREE_STATIC (init) = 1;
init = tree_cons (NULL_TREE, init, NULL_TREE);
return init;
@@ -823,7 +824,9 @@ generic_initializer (tree desc, tree target)
tree init = tinfo_base_init (desc, target);
init = build_constructor (NULL_TREE, init);
- TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
+ TREE_CONSTANT (init) = 1;
+ TREE_INVARIANT (init) = 1;
+ TREE_STATIC (init) = 1;
return init;
}
@@ -850,7 +853,9 @@ ptr_initializer (tree desc, tree target, bool *non_public_ptr)
init);
init = build_constructor (NULL_TREE, nreverse (init));
- TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
+ TREE_CONSTANT (init) = 1;
+ TREE_INVARIANT (init) = 1;
+ TREE_STATIC (init) = 1;
return init;
}
@@ -887,7 +892,9 @@ ptm_initializer (tree desc, tree target, bool *non_public_ptr)
init);
init = build_constructor (NULL_TREE, nreverse (init));
- TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
+ TREE_CONSTANT (init) = 1;
+ TREE_INVARIANT (init) = 1;
+ TREE_STATIC (init) = 1;
return init;
}
@@ -955,7 +962,9 @@ class_initializer (tree desc, tree target, tree trail)
TREE_CHAIN (init) = trail;
init = build_constructor (NULL_TREE, init);
- TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
+ TREE_CONSTANT (init) = 1;
+ TREE_INVARIANT (init) = 1;
+ TREE_STATIC (init) = 1;
return init;
}