aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 6d60d4c..8a3582d 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1020,7 +1020,9 @@ get_pseudo_ti_init (tree type, unsigned tk_index)
tree base_binfo = BINFO_BASE_BINFO (TYPE_BINFO (type), 0);
tree tinfo = get_tinfo_ptr (BINFO_TYPE (base_binfo));
tree base_inits = tree_cons (NULL_TREE, tinfo, NULL_TREE);
-
+
+ /* get_tinfo_ptr might have reallocated the tinfo_descs vector. */
+ ti = VEC_index (tinfo_s, tinfo_descs, tk_index);
return class_initializer (ti, type, base_inits);
}
@@ -1079,6 +1081,9 @@ get_pseudo_ti_init (tree type, unsigned tk_index)
base_inits = tree_cons (NULL_TREE,
build_int_cst (NULL_TREE, hint),
base_inits);
+
+ /* get_tinfo_ptr might have reallocated the tinfo_descs vector. */
+ ti = VEC_index (tinfo_s, tinfo_descs, tk_index);
return class_initializer (ti, type, base_inits);
}
}