diff options
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index e843692e020..8e44338459e 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -1293,8 +1293,6 @@ typedef struct dovar_init_d { tree init; } dovar_init; -DEF_VEC_O(dovar_init); -DEF_VEC_ALLOC_O(dovar_init,heap); static tree gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock, @@ -1307,7 +1305,7 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock, stmtblock_t body; gfc_omp_clauses *clauses = code->ext.omp_clauses; int i, collapse = clauses->collapse; - VEC(dovar_init,heap) *inits = NULL; + vec<dovar_init> inits = vNULL; dovar_init *di; unsigned ix; @@ -1435,7 +1433,7 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock, tmp = fold_build2_loc (input_location, MULT_EXPR, type, count, step); tmp = fold_build2_loc (input_location, PLUS_EXPR, type, from, tmp); dovar_init e = {dovar, tmp}; - VEC_safe_push (dovar_init, heap, inits, e); + inits.safe_push (e); } if (!dovar_found) @@ -1506,9 +1504,9 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock, gfc_start_block (&body); - FOR_EACH_VEC_ELT (dovar_init, inits, ix, di) + FOR_EACH_VEC_ELT (inits, ix, di) gfc_add_modify (&body, di->var, di->init); - VEC_free (dovar_init, heap, inits); + inits.release (); /* Cycle statement is implemented with a goto. Exit statement must not be present for this loop. */ |