summaryrefslogtreecommitdiff
path: root/gcc/opts-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r--gcc/opts-common.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index e024537fa0f..356d941761e 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -1142,13 +1142,15 @@ set_option (struct gcc_options *opts, struct gcc_options *opts_set,
case CLVC_DEFER:
{
- VEC(cl_deferred_option,heap) *vec
- = (VEC(cl_deferred_option,heap) *) *(void **) flag_var;
+ vec<cl_deferred_option> *v
+ = (vec<cl_deferred_option> *) *(void **) flag_var;
cl_deferred_option p = {opt_index, arg, value};
- VEC_safe_push (cl_deferred_option, heap, vec, p);
- *(void **) flag_var = vec;
+ if (!v)
+ v = XCNEW (vec<cl_deferred_option>);
+ v->safe_push (p);
+ *(void **) flag_var = v;
if (set_flag_var)
- *(void **) set_flag_var = vec;
+ *(void **) set_flag_var = v;
}
break;
}