aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 1bcb146..fec1c5d 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -9351,7 +9351,6 @@ build_vtbl_initializer (tree binfo,
tree vcall_index;
tree fn, fn_original;
tree init = NULL_TREE;
- tree idx = size_int (jx++);
fn = BV_FN (v);
fn_original = fn;
@@ -9455,7 +9454,7 @@ build_vtbl_initializer (tree binfo,
int i;
if (init == size_zero_node)
for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
- CONSTRUCTOR_APPEND_ELT (*inits, idx, init);
+ CONSTRUCTOR_APPEND_ELT (*inits, size_int (jx++), init);
else
for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
{
@@ -9463,11 +9462,11 @@ build_vtbl_initializer (tree binfo,
fn, build_int_cst (NULL_TREE, i));
TREE_CONSTANT (fdesc) = 1;
- CONSTRUCTOR_APPEND_ELT (*inits, idx, fdesc);
+ CONSTRUCTOR_APPEND_ELT (*inits, size_int (jx++), fdesc);
}
}
else
- CONSTRUCTOR_APPEND_ELT (*inits, idx, init);
+ CONSTRUCTOR_APPEND_ELT (*inits, size_int (jx++), init);
}
}