aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index b1b83d0..d1da390 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5779,7 +5779,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
register whose mode size isn't equal to SIZE since
clear_storage can't handle this case. */
else if (size > 0
- && (((int)VEC_length (constructor_elt, CONSTRUCTOR_ELTS (exp))
+ && (((int)vec_safe_length (CONSTRUCTOR_ELTS (exp))
!= fields_length (type))
|| mostly_zeros_p (exp))
&& (!REG_P (target)
@@ -6241,7 +6241,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
/* Store each element of the constructor into the corresponding
element of TARGET, determined by counting the elements. */
for (idx = 0, i = 0;
- VEC_iterate (constructor_elt, CONSTRUCTOR_ELTS (exp), idx, ce);
+ vec_safe_iterate (CONSTRUCTOR_ELTS (exp), idx, &ce);
idx++, i += bitsize / elt_size)
{
HOST_WIDE_INT eltpos;
@@ -7131,7 +7131,7 @@ safe_from_p (const_rtx x, tree exp, int top_p)
constructor_elt *ce;
unsigned HOST_WIDE_INT idx;
- FOR_EACH_VEC_ELT (constructor_elt, CONSTRUCTOR_ELTS (exp), idx, ce)
+ FOR_EACH_VEC_SAFE_ELT (CONSTRUCTOR_ELTS (exp), idx, ce)
if ((ce->index != NULL_TREE && !safe_from_p (x, ce->index, 0))
|| !safe_from_p (x, ce->value, 0))
return 0;
@@ -9325,9 +9325,9 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
}
if (!tmp)
{
- VEC(constructor_elt,gc) *v;
+ vec<constructor_elt, va_gc> *v;
unsigned i;
- v = VEC_alloc (constructor_elt, gc, VECTOR_CST_NELTS (exp));
+ vec_alloc (v, VECTOR_CST_NELTS (exp));
for (i = 0; i < VECTOR_CST_NELTS (exp); ++i)
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, VECTOR_CST_ELT (exp, i));
tmp = build_constructor (type, v);