Patchwork Add a generic vNULL for initializing vec<> instances

login
register
mail settings
Submitter Diego Novillo
Date Nov. 20, 2012, 9:20 p.m.
Message ID <20121120212058.GA19666@google.com>
Download mbox | patch
Permalink /patch/200520/
State New
Headers show

Comments

Diego Novillo - Nov. 20, 2012, 9:20 p.m.
This patch implements Jakub's idea of adding an empty struct with
a typecast operator that returns nil vectors.  This is useful to
shorten all the initializers when declaring vec instances or passing
nil vectors as function arguments.

Tested on x86_64.  Committed.


2012-11-20  Diego Novillo  <dnovillo@google.com>
	    Jakub Jelinek  <jakub@redhat.com>

ChangeLog
	* vec.h (struct vnull): Declare.
	(vNULL): Declare.
	* vec.c (vNULL): Define.
	* bb-reorder.c: Replace all vec<T, A>() initializers with vNULL.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraph.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/i386/i386.c: Likewise.
	* df-core.c: Likewise.
	* dominance.c: Likewise.
	* dwarf2out.c: Likewise.
	* except.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* genautomata.c: Likewise.
	* graphds.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite.c: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ira-build.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-symtab.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* ree.c: Likewise.
	* sched-deps.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* stor-layout.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* value-prof.c: Likewise.
	* varasm.c: Likewise.

ada/ChangeLog
	* gcc-interface/decl.c: Replace all vec<T,A>()
	initializers with vNULL.

cp/ChangeLog
	* name-lookup.c: Replace all vec<T, A>() initializers
	with vNULL.
	* semantics.c: Likewise.

fortran/ChangeLog
	* trans-openmp.c: Replace all vec<T, A>() initializers
	with vNULL.

lto/ChangeLog
	* lto.c: Replace all vec<T, A>() initializers with vNULL.

objc/ChangeLog
	* objc-act.c: Replace all vec<T, A>() initializers with vNULL.

Patch

diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 91cee82..88afccf 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -3327,7 +3327,7 @@  gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 		  gnu_variant_list
 		    = build_variant_list (TREE_TYPE (gnu_variant_part),
 					  gnu_subst_list,
-					  vec<variant_desc>());
+					  vNULL);
 
 		  /* If all the qualifiers are unconditionally true, the
 		     innermost variant is statically selected.  */
@@ -7552,7 +7552,7 @@  build_position_list (tree gnu_type, bool do_not_flatten_variant, tree gnu_pos,
 static vec<subst_pair>
 build_subst_list (Entity_Id gnat_subtype, Entity_Id gnat_type, bool definition)
 {
-  vec<subst_pair> gnu_list = vec<subst_pair>();
+  vec<subst_pair> gnu_list = vNULL;
   Entity_Id gnat_discrim;
   Node_Id gnat_value;
 
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 433b1a7..ed22bdf 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1461,7 +1461,7 @@  fix_up_crossing_landing_pad (eh_landing_pad old_lp, basic_block old_bb)
 static vec<edge> 
 find_rarely_executed_basic_blocks_and_crossing_edges (void)
 {
-  vec<edge> crossing_edges = vec<edge>();
+  vec<edge> crossing_edges = vNULL;
   basic_block bb;
   edge e;
   edge_iterator ei;
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 856baa9..083e52a 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1521,7 +1521,7 @@  static rtx
 expand_used_vars (void)
 {
   tree var, outer_block = DECL_INITIAL (current_function_decl);
-  vec<tree> maybe_local_decls = vec<tree>();
+  vec<tree> maybe_local_decls = vNULL;
   rtx var_end_seq = NULL_RTX;
   struct pointer_map_t *ssa_name_decls;
   unsigned i;
@@ -1675,8 +1675,8 @@  expand_used_vars (void)
     {
       struct stack_vars_data data;
 
-      data.asan_vec = vec<HOST_WIDE_INT>();
-      data.asan_decl_vec = vec<tree>();
+      data.asan_vec = vNULL;
+      data.asan_decl_vec = vNULL;
 
       /* Reorder decls to be protected by iterating over the variables
 	 array multiple times, and allocating out of each phase in turn.  */
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index 8c5b45a..b45493a 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -92,7 +92,7 @@  get_loop_latch_edges (const struct loop *loop)
 {
   edge_iterator ei;
   edge e;
-  vec<edge> ret = vec<edge>();
+  vec<edge> ret = vNULL;
 
   FOR_EACH_EDGE (e, ei, loop->header->preds)
     {
@@ -225,7 +225,7 @@  flow_loops_free (struct loops *loops)
 int
 flow_loop_nodes_find (basic_block header, struct loop *loop)
 {
-  vec<basic_block> stack = vec<basic_block>();
+  vec<basic_block> stack = vNULL;
   int num_nodes = 1;
   edge latch;
   edge_iterator latch_ei;
@@ -1117,7 +1117,7 @@  release_recorded_exits (void)
 vec<edge> 
 get_loop_exit_edges (const struct loop *loop)
 {
-  vec<edge> edges = vec<edge>();
+  vec<edge> edges = vNULL;
   edge e;
   unsigned i;
   basic_block *body;
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index 9b10284..7fdbd4a 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -493,7 +493,7 @@  vec<basic_block>
 get_loop_hot_path (const struct loop *loop)
 {
   basic_block bb = loop->header;
-  vec<basic_block> path = vec<basic_block>();
+  vec<basic_block> path = vNULL;
   bitmap visited = BITMAP_ALLOC (NULL);
 
   while (true)
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index a1972ed..34f7301 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -588,7 +588,7 @@  scale_loop_profile (struct loop *loop, int scale, int iteration_bound)
 static void
 update_dominators_in_loop (struct loop *loop)
 {
-  vec<basic_block> dom_bbs = vec<basic_block>();
+  vec<basic_block> dom_bbs = vNULL;
   sbitmap seen;
   basic_block *body;
   unsigned i;
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index c53e51c..3af5456 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2184,7 +2184,7 @@  collect_callers_of_node_1 (struct cgraph_node *node, void *data)
 vec<cgraph_edge_p> 
 collect_callers_of_node (struct cgraph_node *node)
 {
-  vec<cgraph_edge_p> redirect_callers = vec<cgraph_edge_p>();
+  vec<cgraph_edge_p> redirect_callers = vNULL;
   cgraph_for_node_and_aliases (node, collect_callers_of_node_1,
 			       &redirect_callers, false);
   return redirect_callers;
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index 175e119..0c9af2c 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -3420,7 +3420,7 @@  try_rename_operands (rtx head, rtx tail, unit_req_table reqs, rtx insn,
   int i;
   unsigned tmp_mask;
   int best_reg, old_reg;
-  vec<du_head_p> involved_chains = vec<du_head_p>();
+  vec<du_head_p> involved_chains = vNULL;
   unit_req_table new_reqs;
 
   for (i = 0, tmp_mask = op_mask; tmp_mask; i++)
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index fc75771..c9f027a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -28768,7 +28768,7 @@  dispatch_function_versions (tree dispatch_decl,
   /* Function version dispatch is via IFUNC.  IFUNC resolvers fire before
      constructors, so explicity call __builtin_cpu_init here.  */
   ifunc_cpu_init_stmt = gimple_build_call_vec (
-                     ix86_builtins [(int) IX86_BUILTIN_CPU_INIT], vec<tree>());
+                     ix86_builtins [(int) IX86_BUILTIN_CPU_INIT], vNULL);
   gimple_seq_add_stmt (&gseq, ifunc_cpu_init_stmt);
   gimple_set_bb (ifunc_cpu_init_stmt, *empty_bb);
   set_bb_seq (*empty_bb, gseq);
@@ -29275,7 +29275,7 @@  ix86_generate_version_dispatcher_body (void *node_p)
 {
   tree resolver_decl;
   basic_block empty_bb;
-  vec<tree> fn_ver_vec = vec<tree>();
+  vec<tree> fn_ver_vec = vNULL;
   tree default_ver_decl;
   struct cgraph_node *versn;
   struct cgraph_node *node;
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 5abebe3..87b1f51 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -4222,8 +4222,8 @@  remove_hidden_names (tree fns)
 void
 suggest_alternatives_for (location_t location, tree name)
 {
-  vec<tree> candidates = vec<tree>();
-  vec<tree> namespaces_to_search = vec<tree>();
+  vec<tree> candidates = vNULL;
+  vec<tree> namespaces_to_search = vNULL;
   int max_to_search = PARAM_VALUE (CXX_MAX_NAMESPACES_FOR_DIAGNOSTIC_HELP);
   int n_searched = 0;
   tree t;
@@ -5900,7 +5900,7 @@  store_binding (tree id, vec<cxx_saved_binding, va_gc> **old_bindings)
 static void
 store_bindings (tree names, vec<cxx_saved_binding, va_gc> **old_bindings)
 {
-  static vec<tree> bindings_need_stored = vec<tree>();
+  static vec<tree> bindings_need_stored = vNULL;
   tree t, id;
   size_t i;
 
@@ -5936,7 +5936,7 @@  static void
 store_class_bindings (vec<cp_class_binding, va_gc> *names,
 		      vec<cxx_saved_binding, va_gc> **old_bindings)
 {
-  static vec<tree> bindings_need_stored = vec<tree>();
+  static vec<tree> bindings_need_stored = vNULL;
   size_t i;
   cp_class_binding *cb;
 
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index bbafa3a..74b897c 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -6510,7 +6510,7 @@  cxx_bind_parameters_in_call (const constexpr_call *old_call, tree t,
    These do not need to be marked for PCH or GC.  */
 
 /* FIXME remember and print actual constant arguments.  */
-static vec<tree> call_stack = vec<tree>();
+static vec<tree> call_stack = vNULL;
 static int call_stack_tick;
 static int last_cx_error_tick;
 
@@ -6536,7 +6536,7 @@  pop_cx_call_context (void)
 vec<tree> 
 cx_error_context (void)
 {
-  vec<tree> r = vec<tree>();
+  vec<tree> r = vNULL;
   if (call_stack_tick != last_cx_error_tick
       && !call_stack.is_empty ())
     r = call_stack;
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 94b10d3..9218cb6 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -991,7 +991,7 @@  df_worklist_dataflow_doublequeue (struct dataflow *dataflow,
   bitmap worklist = BITMAP_ALLOC (&df_bitmap_obstack);
   int age = 0;
   bool changed;
-  vec<int> last_visit_age = vec<int>();
+  vec<int> last_visit_age = vNULL;
   int prev_age;
   basic_block bb;
   int i;
diff --git a/gcc/dominance.c b/gcc/dominance.c
index 4168fde..0f1e265 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -745,12 +745,12 @@  get_dominated_by (enum cdi_direction dir, basic_block bb)
 {
   unsigned int dir_index = dom_convert_dir_to_idx (dir);
   struct et_node *node = bb->dom[dir_index], *son = node->son, *ason;
-  vec<basic_block> bbs = vec<basic_block>();
+  vec<basic_block> bbs = vNULL;
 
   gcc_checking_assert (dom_computed[dir_index]);
 
   if (!son)
-    return vec<basic_block>();
+    return vNULL;
 
   bbs.safe_push ((basic_block) son->data);
   for (ason = son->right; ason != son; ason = ason->right)
@@ -769,7 +769,7 @@  get_dominated_by_region (enum cdi_direction dir, basic_block *region,
 {
   unsigned i;
   basic_block dom;
-  vec<basic_block> doms = vec<basic_block>();
+  vec<basic_block> doms = vNULL;
 
   for (i = 0; i < n_region; i++)
     region[i]->flags |= BB_DUPLICATED;
@@ -793,7 +793,7 @@  get_dominated_by_region (enum cdi_direction dir, basic_block *region,
 vec<basic_block> 
 get_dominated_to_depth (enum cdi_direction dir, basic_block bb, int depth)
 {
-  vec<basic_block> bbs = vec<basic_block>();
+  vec<basic_block> bbs = vNULL;
   unsigned i;
   unsigned next_level_start;
 
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c25b7b7..f0256ae 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -18740,7 +18740,7 @@  static char *
 gen_producer_string (void)
 {
   size_t j;
-  vec<dchar_p> switches = vec<dchar_p>();
+  vec<dchar_p> switches = vNULL;
   const char *language_string = lang_hooks.name;
   char *producer, *tail;
   const char *p;
diff --git a/gcc/except.c b/gcc/except.c
index c0ac835..287b75b 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1239,7 +1239,7 @@  sjlj_emit_dispatch_table (rtx dispatch_label, int num_dispatch)
   eh_region r;
   edge e;
   int i, disp_index;
-  vec<tree> dispatch_labels = vec<tree>();
+  vec<tree> dispatch_labels = vNULL;
 
   fc = crtl->eh.sjlj_fc;
 
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index a844b08..8e44338 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -1305,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> inits = vec<dovar_init>();
+  vec<dovar_init> inits = vNULL;
   dovar_init *di;
   unsigned ix;
 
diff --git a/gcc/function.c b/gcc/function.c
index 876e1c6..9a8e0ae 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2265,7 +2265,7 @@  assign_parms_augmented_arg_list (struct assign_parm_data_all *all)
 {
   tree fndecl = current_function_decl;
   tree fntype = TREE_TYPE (fndecl);
-  vec<tree> fnargs = vec<tree>();
+  vec<tree> fnargs = vNULL;
   tree arg;
 
   for (arg = DECL_ARGUMENTS (fndecl); arg; arg = DECL_CHAIN (arg))
@@ -5874,7 +5874,7 @@  thread_prologue_and_epilogue_insns (void)
 {
   bool inserted;
 #ifdef HAVE_simple_return
-  vec<edge> unconverted_simple_returns = vec<edge>();
+  vec<edge> unconverted_simple_returns = vNULL;
   bool nonempty_prologue;
   bitmap_head bb_flags;
   unsigned max_grow_size;
@@ -6374,7 +6374,7 @@  thread_prologue_and_epilogue_insns (void)
 
 	  if (LABEL_P (BB_HEAD (last_bb))
 	      && !active_insn_between (BB_HEAD (last_bb), BB_END (last_bb)))
-	    convert_jumps_to_returns (last_bb, false, vec<edge>());
+	    convert_jumps_to_returns (last_bb, false, vNULL);
 
 	  if (EDGE_COUNT (last_bb->preds) != 0
 	      && single_succ_p (last_bb))
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 4be7cdc..ad09afd 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -3193,7 +3193,7 @@  hoist_code (void)
 	      /* Number of occurrences of EXPR that can be hoisted to BB.  */
 	      int hoistable = 0;
 	      /* Occurrences reachable from BB.  */
-	      vec<occr_t> occrs_to_hoist = vec<occr_t>();
+	      vec<occr_t> occrs_to_hoist = vNULL;
 	      /* We want to insert the expression into BB only once, so
 		 note when we've inserted it.  */
 	      int insn_inserted_p;
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index faa9bf8..8d93f0e 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -6255,7 +6255,7 @@  set_new_cycle_flags (state_t state)
 static void
 minimize_DFA (automaton_t automaton)
 {
-  vec<state_t> equiv_classes = vec<state_t>();
+  vec<state_t> equiv_classes = vNULL;
 
   evaluate_equiv_classes (automaton, &equiv_classes);
   merge_states (automaton, equiv_classes);
diff --git a/gcc/graphds.c b/gcc/graphds.c
index 1614b15..beaef16 100644
--- a/gcc/graphds.c
+++ b/gcc/graphds.c
@@ -274,7 +274,7 @@  int
 graphds_scc (struct graph *g, bitmap subgraph)
 {
   int *queue = XNEWVEC (int, g->n_vertices);
-  vec<int> postorder = vec<int>();
+  vec<int> postorder = vNULL;
   int nq, i, comp;
   unsigned v;
   bitmap_iterator bi;
@@ -400,7 +400,7 @@  void
 graphds_domtree (struct graph *g, int entry,
 		 int *parent, int *son, int *brother)
 {
-  vec<int> postorder = vec<int>();
+  vec<int> postorder = vNULL;
   int *marks = XCNEWVEC (int, g->n_vertices);
   int mark = 1, i, v, idom;
   bool changed = true;
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index c641358..d6bb0db 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -267,7 +267,7 @@  stmt_has_simple_data_refs_p (loop_p outermost_loop ATTRIBUTE_UNUSED,
   unsigned i;
   int j;
   bool res = true;
-  vec<data_reference_p> drs = vec<data_reference_p>();
+  vec<data_reference_p> drs = vNULL;
   loop_p outer;
 
   for (outer = loop_containing_stmt (stmt); outer; outer = loop_outer (outer))
@@ -1585,7 +1585,7 @@  dot_all_scops (vec<scop_p> scops)
 DEBUG_FUNCTION void
 dot_scop (scop_p scop)
 {
-  vec<scop_p> scops = vec<scop_p>();
+  vec<scop_p> scops = vNULL;
 
   if (scop)
     scops.safe_push (scop);
diff --git a/gcc/graphite.c b/gcc/graphite.c
index beb94a7..b45659c 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -255,7 +255,7 @@  graphite_transform_loops (void)
   int i;
   scop_p scop;
   bool need_cfg_cleanup_p = false;
-  vec<scop_p> scops = vec<scop_p>();
+  vec<scop_p> scops = vNULL;
   htab_t bb_pbb_mapping;
   isl_ctx *ctx;
 
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 48e15f8..40350eb 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -383,13 +383,13 @@  const struct common_sched_info_def haifa_common_sched_info =
   };
 
 /* Mapping from instruction UID to its Logical UID.  */
-vec<int> sched_luids = vec<int>();
+vec<int> sched_luids = vNULL;
 
 /* Next LUID to assign to an instruction.  */
 int sched_max_luid = 1;
 
 /* Haifa Instruction Data.  */
-vec<haifa_insn_data_def> h_i_d = vec<haifa_insn_data_def>();
+vec<haifa_insn_data_def> h_i_d = vNULL;
 
 void (* sched_init_only_bb) (basic_block, basic_block);
 
@@ -4187,7 +4187,7 @@  undo_replacements_for_backtrack (struct haifa_saved_data *save)
 static void
 unschedule_insns_until (rtx insn)
 {
-  vec<rtx> recompute_vec = vec<rtx>();
+  vec<rtx> recompute_vec = vNULL;
 
   /* Make two passes over the insns to be unscheduled.  First, we clear out
      dependencies and other trivial bookkeeping.  */
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index f9ddfd6..b518b0e 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2850,8 +2850,8 @@  cond_move_process_if_block (struct noce_if_info *if_info)
   int c;
   struct pointer_map_t *then_vals;
   struct pointer_map_t *else_vals;
-  vec<rtx> then_regs = vec<rtx>();
-  vec<rtx> else_regs = vec<rtx>();
+  vec<rtx> then_regs = vNULL;
+  vec<rtx> else_regs = vNULL;
   unsigned int i;
   int success_p = FALSE;
 
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index a0f5f5f..c22f63b 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1575,7 +1575,7 @@  devirtualization_time_bonus (struct cgraph_node *node,
       tree target;
 
       target = ipa_get_indirect_edge_target (ie, known_csts, known_binfos,
-					vec<ipa_agg_jump_function_p>());
+					vNULL);
       if (!target)
 	continue;
 
@@ -2248,9 +2248,7 @@  ipcp_discover_new_direct_edges (struct cgraph_node *node,
       tree target;
 
       next_ie = ie->next_callee;
-      target = ipa_get_indirect_edge_target (ie, known_vals,
-					vec<tree>(),
-					vec<ipa_agg_jump_function_p>());
+      target = ipa_get_indirect_edge_target (ie, known_vals, vNULL, vNULL);
       if (target)
 	{
 	  ipa_make_edge_direct_to_target (ie, target);
@@ -2731,10 +2729,10 @@  find_more_scalar_values_for_callers_subset (struct cgraph_node *node,
 static vec<ipa_agg_jf_item_t>
 copy_plats_to_inter (struct ipcp_param_lattices *plats, HOST_WIDE_INT offset)
 {
-  vec<ipa_agg_jf_item_t> res = vec<ipa_agg_jf_item_t>();
+  vec<ipa_agg_jf_item_t> res = vNULL;
 
   if (!plats->aggs || plats->aggs_contain_variable || plats->aggs_bottom)
-    return vec<ipa_agg_jf_item>();
+    return vNULL;
 
   for (struct ipcp_agg_lattice *aglat = plats->aggs; aglat; aglat = aglat->next)
     if (ipa_lat_is_single_const (aglat))
@@ -2796,7 +2794,7 @@  static vec<ipa_agg_jf_item_t>
 agg_replacements_to_vector (struct cgraph_node *node, HOST_WIDE_INT offset)
 {
   struct ipa_agg_replacement_value *av;
-  vec<ipa_agg_jf_item_t> res = vec<ipa_agg_jf_item_t>();
+  vec<ipa_agg_jf_item_t> res = vNULL;
 
   for (av = ipa_get_agg_replacements_for_node (node); av; av = av->next)
     {
@@ -2874,7 +2872,7 @@  find_aggregate_values_for_callers_subset (struct cgraph_node *node,
   for (i = 0; i < count ; i++)
     {
       struct cgraph_edge *cs;
-      vec<ipa_agg_jf_item_t> inter = vec<ipa_agg_jf_item_t>();
+      vec<ipa_agg_jf_item_t> inter = vNULL;
       struct ipa_agg_jf_item *item;
       int j;
 
@@ -3283,7 +3281,7 @@  decide_whether_version_node (struct cgraph_node *node)
   struct ipa_node_params *info = IPA_NODE_REF (node);
   int i, count = ipa_get_param_count (info);
   vec<tree> known_csts, known_binfos;
-  vec<ipa_agg_jump_function_t> known_aggs = vec<ipa_agg_jump_function_t>();
+  vec<ipa_agg_jump_function_t> known_aggs = vNULL;
   bool ret = false;
 
   if (count == 0)
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 61fb48d..8f5b1f2 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -848,9 +848,8 @@  evaluate_properties_for_edge (struct cgraph_edge *e, bool inline_p,
 {
   struct cgraph_node *callee = cgraph_function_or_thunk_node (e->callee, NULL);
   struct inline_summary *info = inline_summary (callee);
-  vec<tree> known_vals = vec<tree>();
-  vec<ipa_agg_jump_function_p> known_aggs
-      = vec<ipa_agg_jump_function_p>();
+  vec<tree> known_vals = vNULL;
+  vec<ipa_agg_jump_function_p> known_aggs = vNULL;
 
   if (clause_ptr)
     *clause_ptr = inline_p ? 0 : 1 << predicate_not_inlined_condition;
@@ -1086,7 +1085,7 @@  inline_node_duplication_hook (struct cgraph_node *src, struct cgraph_node *dst,
       vec<size_time_entry, va_gc> *entry = info->entry;
       /* Use SRC parm info since it may not be copied yet.  */
       struct ipa_node_params *parms_info = IPA_NODE_REF (src);
-      vec<tree> known_vals = vec<tree>();
+      vec<tree> known_vals = vNULL;
       int count = ipa_get_param_count (parms_info);
       int i,j;
       clause_t possible_truths;
@@ -1115,8 +1114,7 @@  inline_node_duplication_hook (struct cgraph_node *src, struct cgraph_node *dst,
 	    }
 	}
       possible_truths = evaluate_conditions_for_known_args (dst, false,
-				    known_vals,
-				    vec<ipa_agg_jump_function_p>());
+				    known_vals, vNULL);
       known_vals.release ();
 
       account_size_time (info, 0, 0, &true_pred);
@@ -2290,7 +2288,7 @@  estimate_function_body_sizes (struct cgraph_node *node, bool early)
   struct inline_summary *info = inline_summary (node);
   struct predicate bb_predicate;
   struct ipa_node_params *parms_info = NULL;
-  vec<predicate_t> nonconstant_names = vec<predicate_t>();
+  vec<predicate_t> nonconstant_names = vNULL;
   int nblocks, n;
   int *order;
   predicate array_index = true_predicate ();
@@ -2962,8 +2960,7 @@  estimate_ipcp_clone_size_and_time (struct cgraph_node *node,
   clause = evaluate_conditions_for_known_args (node, false, known_vals,
 					       known_aggs);
   estimate_node_size_and_time (node, clause, known_vals, known_binfos,
-			       known_aggs, ret_size, ret_time, hints,
-			       vec<inline_param_summary_t>());
+			       known_aggs, ret_size, ret_time, hints, vNULL);
 }
 
 /* Translate all conditions from callee representation into caller
@@ -3255,8 +3252,8 @@  inline_merge_summary (struct cgraph_edge *edge)
   struct inline_summary *info = inline_summary (to);
   clause_t clause = 0;		/* not_inline is known to be false.  */
   size_time_entry *e;
-  vec<int> operand_map = vec<int>();
-  vec<int> offset_map = vec<int>();
+  vec<int> operand_map = vNULL;
+  vec<int> offset_map = vNULL;
   int i;
   struct predicate toplev_predicate;
   struct predicate true_p = true_predicate ();
@@ -3378,9 +3375,7 @@  inline_update_overall_summary (struct cgraph_node *node)
     }
   estimate_calls_size_and_time (node, &info->size, &info->time, NULL,
 				~(clause_t)(1 << predicate_false_condition),
-				vec<tree>(),
-				vec<tree>(),
-				vec<ipa_agg_jump_function_p>());
+				vNULL, vNULL, vNULL);
   info->time = (info->time + INLINE_TIME_SCALE / 2) / INLINE_TIME_SCALE;
   info->size = (info->size + INLINE_SIZE_SCALE / 2) / INLINE_SIZE_SCALE;
 }
@@ -3485,8 +3480,7 @@  do_estimate_edge_size (struct cgraph_edge *edge)
 				&clause, &known_vals, &known_binfos,
 				&known_aggs);
   estimate_node_size_and_time (callee, clause, known_vals, known_binfos,
-			       known_aggs, &size, NULL, NULL,
-			       vec<inline_param_summary_t>());
+			       known_aggs, &size, NULL, NULL, vNULL);
   known_vals.release ();
   known_binfos.release ();
   known_aggs.release ();
@@ -3525,8 +3519,7 @@  do_estimate_edge_hints (struct cgraph_edge *edge)
 				&clause, &known_vals, &known_binfos,
 				&known_aggs);
   estimate_node_size_and_time (callee, clause, known_vals, known_binfos,
-			       known_aggs, NULL, NULL, &hints,
-			       vec<inline_param_summary_t>());
+			       known_aggs, NULL, NULL, &hints, vNULL);
   known_vals.release ();
   known_binfos.release ();
   known_aggs.release ();
@@ -3775,8 +3768,7 @@  inline_read_section (struct lto_file_decl_data *file_data, const char *data,
 
   data_in =
     lto_data_in_create (file_data, (const char *) data + string_offset,
-			header->string_size,
-			vec<ld_plugin_symbol_resolution_t>());
+			header->string_size, vNULL);
   f_count = streamer_read_uhwi (&ib);
   for (i = 0; i < f_count; i++)
     {
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 19b2c85..84f4fcc 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -171,8 +171,7 @@  clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
 	  struct cgraph_node *n;
 	  n = cgraph_clone_node (e->callee, e->callee->symbol.decl,
 				 e->count, e->frequency,
-				 update_original, vec<cgraph_edge_p>(),
-				 true);
+				 update_original, vNULL, true);
 	  cgraph_redirect_edge_callee (e, n);
 	}
     }
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 14e8256..5013588 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1313,8 +1313,7 @@  recursive_inlining (struct cgraph_edge *edge,
 	  /* We need original clone to copy around.  */
 	  master_clone = cgraph_clone_node (node, node->symbol.decl,
 					    node->count, CGRAPH_FREQ_BASE,
-					    false, vec<cgraph_edge_p>(),
-					    true);
+					    false, vNULL, true);
 	  for (e = master_clone->callees; e; e = e->next_callee)
 	    if (!e->inline_failed)
 	      clone_inlined_nodes (e, true, false, NULL);
@@ -1403,7 +1402,7 @@  inline_small_functions (void)
   fibheap_t edge_heap = fibheap_new ();
   bitmap updated_nodes = BITMAP_ALLOC (NULL);
   int min_size, max_size;
-  vec<cgraph_edge_p> new_indirect_edges = vec<cgraph_edge_p>();
+  vec<cgraph_edge_p> new_indirect_edges = vNULL;
   int initial_size = 0;
   struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
 
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 3150bd6..b7da254 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3534,8 +3534,7 @@  ipa_prop_read_section (struct lto_file_decl_data *file_data, const char *data,
 
   data_in =
     lto_data_in_create (file_data, (const char *) data + string_offset,
-			header->string_size,
-			vec<ld_plugin_symbol_resolution_t>());
+			header->string_size, vNULL);
   count = streamer_read_uhwi (&ib_main);
 
   for (i = 0; i < count; i++)
@@ -3708,8 +3707,7 @@  read_replacements_section (struct lto_file_decl_data *file_data,
 			header->main_size);
 
   data_in = lto_data_in_create (file_data, (const char *) data + string_offset,
-				header->string_size,
-				vec<ld_plugin_symbol_resolution>());
+				header->string_size, vNULL);
   count = streamer_read_uhwi (&ib_main);
 
   for (i = 0; i < count; i++)
@@ -3790,7 +3788,7 @@  adjust_agg_replacement_values (struct cgraph_node *node,
 unsigned int
 ipcp_transform_function (struct cgraph_node *node)
 {
-  vec<ipa_param_descriptor_t> descriptors = vec<ipa_param_descriptor_t>();
+  vec<ipa_param_descriptor_t> descriptors = vNULL;
   struct param_analysis_info *parms_ainfo;
   struct ipa_agg_replacement_value *aggval;
   gimple_stmt_iterator gsi;
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index ceed8d2..f6b469a 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -190,7 +190,7 @@  verify_non_ssa_vars (struct split_point *current, bitmap non_ssa_vars,
 		     basic_block return_bb)
 {
   bitmap seen = BITMAP_ALLOC (NULL);
-  vec<basic_block> worklist = vec<basic_block>();
+  vec<basic_block> worklist = vNULL;
   edge e;
   edge_iterator ei;
   bool ok = true;
@@ -889,7 +889,7 @@  static void
 find_split_points (int overall_time, int overall_size)
 {
   stack_entry first;
-  vec<stack_entry> stack = vec<stack_entry>();
+  vec<stack_entry> stack = vNULL;
   basic_block bb;
   basic_block return_bb = find_return_bb ();
   struct split_point current;
@@ -1038,7 +1038,7 @@  find_split_points (int overall_time, int overall_size)
 static void
 split_function (struct split_point *split_point)
 {
-  vec<tree> args_to_pass = vec<tree>();
+  vec<tree> args_to_pass = vNULL;
   bitmap args_to_skip;
   tree parm;
   int num = 0;
@@ -1183,7 +1183,7 @@  split_function (struct split_point *split_point)
 
   /* Now create the actual clone.  */
   rebuild_cgraph_edges ();
-  node = cgraph_function_versioning (cur_node, vec<cgraph_edge_p>(),
+  node = cgraph_function_versioning (cur_node, vNULL,
 				     NULL,
 				     args_to_skip,
 				     !split_part_return_p,
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index d133f79..ba15e36 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -240,7 +240,7 @@  ipa_free_postorder_info (void)
 vec<cgraph_node_ptr> 
 ipa_get_nodes_in_cycle (struct cgraph_node *node)
 {
-  vec<cgraph_node_ptr> v = vec<cgraph_node_ptr>();
+  vec<cgraph_node_ptr> v = vNULL;
   struct ipa_dfs_info *node_dfs_info;
   while (node)
     {
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index e0b9c1b..9cd1016 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -1475,7 +1475,7 @@  static vec<ira_loop_tree_node_t>
 ira_loop_tree_body_rev_postorder (ira_loop_tree_node_t loop_node ATTRIBUTE_UNUSED,
 				  vec<ira_loop_tree_node_t> loop_preorder)
 {
-  vec<ira_loop_tree_node_t> topsort_nodes = vec<ira_loop_tree_node_t>();
+  vec<ira_loop_tree_node_t> topsort_nodes = vNULL;
   unsigned int n_loop_preorder;
 
   n_loop_preorder = loop_preorder.length ();
@@ -1580,7 +1580,7 @@  ira_traverse_loop_tree (bool bb_p, ira_loop_tree_node_t loop_node,
   if (bb_p)
     {
       vec<ira_loop_tree_node_t>
-	  loop_preorder = vec<ira_loop_tree_node_t>();
+	  loop_preorder = vNULL;
       unsigned int i;
 
       /* Add all nodes to the set of nodes to visit.  The IRA loop tree
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 7d936ef..4273622 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -913,7 +913,7 @@  input_node (struct lto_file_decl_data *file_data,
     {
       node = cgraph_clone_node (cgraph (nodes[clone_ref]), fn_decl,
 				0, CGRAPH_FREQ_BASE, false,
-				vec<cgraph_edge_p>(), false);
+				vNULL, false);
     }
   else
     node = cgraph_get_create_node (fn_decl);
@@ -926,7 +926,7 @@  input_node (struct lto_file_decl_data *file_data,
   node->count_materialization_scale = streamer_read_hwi (ib);
 
   count = streamer_read_hwi (ib);
-  node->ipa_transforms_to_apply = vec<ipa_opt_pass>();
+  node->ipa_transforms_to_apply = vNULL;
   for (i = 0; i < count; i++)
     {
       struct opt_pass *pass;
@@ -1126,7 +1126,7 @@  input_cgraph_1 (struct lto_file_decl_data *file_data,
 		struct lto_input_block *ib)
 {
   enum LTO_symtab_tags tag;
-  vec<symtab_node> nodes = vec<symtab_node>();
+  vec<symtab_node> nodes = vNULL;
   symtab_node node;
   unsigned i;
 
@@ -1573,8 +1573,7 @@  input_cgraph_opt_section (struct lto_file_decl_data *file_data,
 
   data_in =
     lto_data_in_create (file_data, (const char *) data + string_offset,
-			header->string_size,
-			vec<ld_plugin_symbol_resolution_t>());
+			header->string_size, vNULL);
   count = streamer_read_uhwi (&ib_main);
 
   for (i = 0; i < count; i++)
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 2c5a760..e262925 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -925,8 +925,7 @@  lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl,
 			header->main_size);
 
   data_in = lto_data_in_create (file_data, data + string_offset,
-			      header->string_size,
-			      vec<ld_plugin_symbol_resolution_t>());
+			      header->string_size, vNULL);
 
   /* Make sure the file was generated by the exact same compiler.  */
   lto_check_version (header->lto_header.major_version,
@@ -1124,8 +1123,7 @@  lto_input_toplevel_asms (struct lto_file_decl_data *file_data, int order_base)
 			header->main_size);
 
   data_in = lto_data_in_create (file_data, data + string_offset,
-			      header->string_size,
-			      vec<ld_plugin_symbol_resolution_t>());
+			      header->string_size, vNULL);
 
   /* Make sure the file was generated by the exact same compiler.  */
   lto_check_version (header->lto_header.major_version,
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c
index bee26f1..0b0cdac 100644
--- a/gcc/lto-symtab.c
+++ b/gcc/lto-symtab.c
@@ -353,7 +353,7 @@  static void
 lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p)
 {
   symtab_node prevailing, e;
-  vec<tree> mismatches = vec<tree>();
+  vec<tree> mismatches = vNULL;
   unsigned i;
   tree decl;
 
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index da55b7e..376af85 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -873,7 +873,7 @@  pop:
 static bool
 gimple_types_compatible_p (tree t1, tree t2)
 {
-  vec<type_pair_t> sccstack = vec<type_pair_t>();
+  vec<type_pair_t> sccstack = vNULL;
   struct pointer_map_t *sccstate;
   struct obstack sccstate_obstack;
   type_pair_t p = NULL;
@@ -1298,7 +1298,7 @@  static hashval_t
 gimple_type_hash (const void *p)
 {
   const_tree t = (const_tree) p;
-  vec<tree> sccstack = vec<tree>();
+  vec<tree> sccstack = vNULL;
   struct pointer_map_t *sccstate;
   struct obstack sccstate_obstack;
   hashval_t val;
@@ -2318,7 +2318,7 @@  lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file)
   const char *data;
   size_t len;
   vec<ld_plugin_symbol_resolution_t>
-	resolutions = vec<ld_plugin_symbol_resolution_t>();
+	resolutions = vNULL;
   int i;
   res_pair *rp;
 
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 3ef84cd..816e339 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -2067,7 +2067,7 @@  objc_build_struct (tree klass, tree fields, tree super_name)
   tree s = objc_start_struct (name);
   tree super = (super_name ? xref_tag (RECORD_TYPE, super_name) : NULL_TREE);
   tree t;
-  vec<tree> objc_info = vec<tree>();
+  vec<tree> objc_info = vNULL;
   int i;
 
   if (super)
diff --git a/gcc/opts-global.c b/gcc/opts-global.c
index 38cd62b..6409ea7 100644
--- a/gcc/opts-global.c
+++ b/gcc/opts-global.c
@@ -353,7 +353,7 @@  handle_common_deferred_options (void)
   if (common_deferred_options)
     v = *((vec<cl_deferred_option> *) common_deferred_options);
   else
-    v = vec<cl_deferred_option>();
+    v = vNULL;
 
   if (flag_dump_all_passed)
     enable_rtl_dump_file ();
diff --git a/gcc/passes.c b/gcc/passes.c
index 7e224fb..909f49e 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -633,7 +633,7 @@  register_pass_name (struct opt_pass *pass, const char *name)
 /* Map from pass id to canonicalized pass name.  */
 
 typedef const char *char_ptr;
-static vec<char_ptr> pass_tab = vec<char_ptr>();
+static vec<char_ptr> pass_tab = vNULL;
 
 /* Callback function for traversing NAME_TO_PASS_MAP.  */
 
@@ -770,9 +770,9 @@  typedef struct uid_range *uid_range_p;
 
 
 static vec<uid_range_p>
-      enabled_pass_uid_range_tab = vec<uid_range_p>();
+      enabled_pass_uid_range_tab = vNULL;
 static vec<uid_range_p>
-      disabled_pass_uid_range_tab = vec<uid_range_p>();
+      disabled_pass_uid_range_tab = vNULL;
 
 
 /* Parse option string for -fdisable- and -fenable-
diff --git a/gcc/ree.c b/gcc/ree.c
index 0279b3d..63f84cb 100644
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -829,7 +829,7 @@  add_removable_extension (const_rtx expr, rtx insn,
 static vec<ext_cand>
 find_removable_extensions (void)
 {
-  vec<ext_cand> insn_list = vec<ext_cand>();
+  vec<ext_cand> insn_list = vNULL;
   basic_block bb;
   rtx insn, set;
   unsigned *def_map = XCNEWVEC (unsigned, max_insn_uid);
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 52e15413..f8b124d 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -59,7 +59,7 @@  struct sched_deps_info_def *sched_deps_info;
 
 /* The data is specific to the Haifa scheduler.  */
 vec<haifa_deps_insn_data_def>
-    h_d_i_d = vec<haifa_deps_insn_data_def>();
+    h_d_i_d = vNULL;
 
 /* Return the major type present in the DS.  */
 enum reg_note
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index e592929..2c0403c 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -50,11 +50,11 @@  along with GCC; see the file COPYING3.  If not see
 
 /* A vector holding bb info for whole scheduling pass.  */
 vec<sel_global_bb_info_def>
-    sel_global_bb_info = vec<sel_global_bb_info_def>();
+    sel_global_bb_info = vNULL;
 
 /* A vector holding bb info.  */
 vec<sel_region_bb_info_def>
-    sel_region_bb_info = vec<sel_region_bb_info_def>();
+    sel_region_bb_info = vNULL;
 
 /* A pool for allocating all lists.  */
 alloc_pool sched_lists_pool;
@@ -70,7 +70,7 @@  struct loop *current_loop_nest;
 
 /* LOOP_NESTS is a vector containing the corresponding loop nest for
    each region.  */
-static vec<loop_p> loop_nests = vec<loop_p>();
+static vec<loop_p> loop_nests = vNULL;
 
 /* Saves blocks already in loop regions, indexed by bb->index.  */
 static sbitmap bbs_in_loop_rgns = NULL;
@@ -1652,7 +1652,7 @@  init_expr (expr_t expr, vinsn_t vi, int spec, int use, int priority,
 void
 copy_expr (expr_t to, expr_t from)
 {
-  vec<expr_history_def> temp = vec<expr_history_def>();
+  vec<expr_history_def> temp = vNULL;
 
   if (EXPR_HISTORY_OF_CHANGES (from).exists ())
     {
@@ -1687,7 +1687,7 @@  copy_expr_onside (expr_t to, expr_t from)
   init_expr (to, EXPR_VINSN (from), EXPR_SPEC (from), EXPR_USEFULNESS (from),
 	     EXPR_PRIORITY (from), EXPR_SCHED_TIMES (from), 0,
 	     EXPR_SPEC_DONE_DS (from), EXPR_SPEC_TO_CHECK_DS (from), 0,
-	     vec<expr_history_def>(),
+	     vNULL,
 	     EXPR_TARGET_AVAILABLE (from), EXPR_WAS_SUBSTITUTED (from),
 	     EXPR_WAS_RENAMED (from), EXPR_NEEDS_SPEC_CHECK_P (from),
              EXPR_CANT_MOVE (from));
@@ -3004,7 +3004,7 @@  init_global_and_expr_for_insn (insn_t insn)
     /* Initialize INSN's expr.  */
     init_expr (INSN_EXPR (insn), vinsn_create (insn, force_unique_p), 0,
 	       REG_BR_PROB_BASE, INSN_PRIORITY (insn), 0, BLOCK_NUM (insn),
-	       spec_done_ds, 0, 0, vec<expr_history_def>(), true,
+	       spec_done_ds, 0, 0, vNULL, true,
 	       false, false, false, CANT_MOVE (insn));
   }
 
@@ -4135,7 +4135,7 @@  finish_region_bb_info (void)
 
 
 /* Data for each insn in current region.  */
-vec<sel_insn_data_def> s_i_d = vec<sel_insn_data_def>();
+vec<sel_insn_data_def> s_i_d = vNULL;
 
 /* Extend data structures for insns from current region.  */
 static void
@@ -4253,7 +4253,7 @@  init_simplejump_data (insn_t insn)
 {
   init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
 	     REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
-	     vec<expr_history_def>(), true, false, false,
+	     vNULL, true, false, false,
 	     false, true);
   INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
   init_first_time_insn_data (insn);
@@ -4504,7 +4504,7 @@  get_av_level (insn_t insn)
 /* The basic block that already has been processed by the sched_data_update (),
    but hasn't been in sel_add_bb () yet.  */
 static vec<basic_block>
-    last_added_blocks = vec<basic_block>();
+    last_added_blocks = vNULL;
 
 /* A pool for allocating successor infos.  */
 static struct
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index 0471423..ddcfeef 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -1050,7 +1050,7 @@  inner_loop_header_p (basic_block bb)
 static inline vec<edge> 
 get_loop_exit_edges_unique_dests (const struct loop *loop)
 {
-  vec<edge> edges = vec<edge>();
+  vec<edge> edges = vNULL;
   struct loop_exit *exit;
 
   gcc_assert (loop->latch != EXIT_BLOCK_PTR
@@ -1104,7 +1104,7 @@  sel_bb_empty_or_nop_p (basic_block bb)
 static inline vec<edge> 
 get_all_loop_exits (basic_block bb)
 {
-  vec<edge> exits = vec<edge>();
+  vec<edge> exits = vNULL;
 
   /* If bb is empty, and we're skipping to loop exits, then
      consider bb as a possible gate to the inner loop now.  */
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index f1d1a77..6fe11b2 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -500,7 +500,7 @@  static int max_ws;
 static int num_insns_scheduled;
 
 /* A vector of expressions is used to be able to sort them.  */
-static vec<expr_t> vec_av_set = vec<expr_t>();
+static vec<expr_t> vec_av_set = vNULL;
 
 /* A vector of vinsns is used to hold temporary lists of vinsns.  */
 typedef vec<vinsn_t> vinsn_vec_t;
@@ -518,7 +518,7 @@  static vinsn_vec_t vec_target_unavailable_vinsns = vinsn_vec_t();
 
 /* Vector to store temporary nops inserted in move_op to prevent removal
    of empty bbs.  */
-static vec<insn_t> vec_temp_moveop_nops = vec<insn_t>();
+static vec<insn_t> vec_temp_moveop_nops = vNULL;
 
 /* These bitmaps record original instructions scheduled on the current
    iteration and bookkeeping copies created by them.  */
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 4735724..03da59e 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -189,7 +189,7 @@  static tree
 self_referential_size (tree size)
 {
   static unsigned HOST_WIDE_INT fnno = 0;
-  vec<tree> self_refs = vec<tree>();
+  vec<tree> self_refs = vNULL;
   tree param_type_list = NULL, param_decl_list = NULL;
   tree t, ref, return_type, fntype, fnname, fndecl;
   unsigned int i;
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 79be8b9..0a428fe 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -1841,10 +1841,10 @@  tm_region_init (struct tm_region *region)
   edge_iterator ei;
   edge e;
   basic_block bb;
-  vec<basic_block> queue = vec<basic_block>();
+  vec<basic_block> queue = vNULL;
   bitmap visited_blocks = BITMAP_ALLOC (NULL);
   struct tm_region *old_region;
-  vec<tm_region_p> bb_regions = vec<tm_region_p>();
+  vec<tm_region_p> bb_regions = vNULL;
 
   all_tm_regions = region;
   bb = single_succ (ENTRY_BLOCK_PTR);
@@ -2403,7 +2403,7 @@  get_tm_region_blocks (basic_block entry_block,
 		      bitmap all_region_blocks,
 		      bool stop_at_irrevocable_p)
 {
-  vec<basic_block> bbs = vec<basic_block>();
+  vec<basic_block> bbs = vNULL;
   unsigned i;
   edge e;
   edge_iterator ei;
@@ -4689,9 +4689,7 @@  ipa_tm_create_version (struct cgraph_node *old_node)
   if (DECL_ONE_ONLY (new_decl))
     DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
 
-  new_node = cgraph_copy_node_for_versioning (old_node, new_decl,
-					      vec<cgraph_edge_p>(),
-					      NULL);
+  new_node = cgraph_copy_node_for_versioning (old_node, new_decl, vNULL, NULL);
   new_node->symbol.externally_visible = old_node->symbol.externally_visible;
   new_node->lowered = true;
   new_node->tm_clone = 1;
@@ -4980,7 +4978,7 @@  ipa_tm_transform_calls (struct cgraph_node *node, struct tm_region *region,
   bool need_ssa_rename = false;
   edge e;
   edge_iterator ei;
-  vec<basic_block> queue = vec<basic_block>();
+  vec<basic_block> queue = vNULL;
   bitmap visited_blocks = BITMAP_ALLOC (NULL);
 
   queue.safe_push (bb);
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index 42f4752..273aed2 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -861,7 +861,7 @@  tree_call_cdce (void)
   basic_block bb;
   gimple_stmt_iterator i;
   bool something_changed = false;
-  vec<gimple> cond_dead_built_in_calls = vec<gimple>();
+  vec<gimple> cond_dead_built_in_calls = vNULL;
   FOR_EACH_BB (bb)
     {
       /* Collect dead call candidates.  */
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index eaf59ea..169a205 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -7269,8 +7269,8 @@  gimple_flow_call_edges_add (sbitmap blocks)
 void
 remove_edge_and_dominated_blocks (edge e)
 {
-  vec<basic_block> bbs_to_remove = vec<basic_block>();
-  vec<basic_block> bbs_to_fix_dom = vec<basic_block>();
+  vec<basic_block> bbs_to_remove = vNULL;
+  vec<basic_block> bbs_to_fix_dom = vNULL;
   bitmap df, df_idom;
   edge f;
   edge_iterator ei;
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 458362c..7e95ad7 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -820,7 +820,7 @@  dr_analyze_innermost (struct data_reference *dr, struct loop *nest)
 static void
 dr_analyze_indices (struct data_reference *dr, loop_p nest, loop_p loop)
 {
-  vec<tree> access_fns = vec<tree>();
+  vec<tree> access_fns = vNULL;
   tree ref, op;
   tree base, off, access_fn;
   basic_block before_loop;
@@ -4615,8 +4615,7 @@  compute_data_dependences_for_bb (basic_block bb,
   if (find_data_references_in_bb (NULL, bb, datarefs) == chrec_dont_know)
     return false;
 
-  return compute_all_dependences (*datarefs, dependence_relations,
-				  vec<loop_p>(),
+  return compute_all_dependences (*datarefs, dependence_relations, vNULL,
 				  compute_self_and_read_read_dependences);
 }
 
diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c
index 788b118..7c63069 100644
--- a/gcc/tree-diagnostic.c
+++ b/gcc/tree-diagnostic.c
@@ -104,7 +104,7 @@  maybe_unwind_expanded_macro_loc (diagnostic_context *context,
                                  source_location where)
 {
   const struct line_map *map;
-  vec<loc_map_pair> loc_vec = vec<loc_map_pair>();
+  vec<loc_map_pair> loc_vec = vNULL;
   unsigned ix;
   loc_map_pair loc, *iter;
 
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 922fcfe..8cc624b 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -3332,7 +3332,7 @@  lower_eh_dispatch (basic_block src, gimple stmt)
     {
     case ERT_TRY:
       {
-	vec<tree> labels = vec<tree>();
+	vec<tree> labels = vNULL;
 	tree default_label = NULL;
 	eh_catch c;
 	edge_iterator ei;
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index a0a766b..33d4c45 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1020,7 +1020,7 @@  classify_partition (loop_p loop, struct graph *rdg, partition_t partition)
 	return;
       /* Now check that if there is a dependence this dependence is
          of a suitable form for memmove.  */
-      vec<loop_p> loops = vec<loop_p>();
+      vec<loop_p> loops = vNULL;
       ddr_p ddr;
       loops.safe_push (loop);
       ddr = initialize_data_dependence_relation (single_load, single_store,
@@ -1506,7 +1506,7 @@  tree_loop_distribution (void)
      walking to innermost loops.  */
   FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST)
     {
-      vec<gimple> work_list = vec<gimple>();
+      vec<gimple> work_list = vNULL;
       basic_block *bbs;
       int num = loop->num;
       int nb_generated_loops = 0;
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index b1dce08..1338a04 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -2300,7 +2300,7 @@  try_combine_chains (vec<chain_p> *chains)
 {
   unsigned i, j;
   chain_p ch1, ch2, cch;
-  vec<chain_p> worklist = vec<chain_p>();
+  vec<chain_p> worklist = vNULL;
 
   FOR_EACH_VEC_ELT (*chains, i, ch1)
     if (chain_can_be_combined_p (ch1))
@@ -2415,7 +2415,7 @@  tree_predictive_commoning_loop (struct loop *loop)
   vec<data_reference_p> datarefs;
   vec<ddr_p> dependences;
   struct component *components;
-  vec<chain_p> chains = vec<chain_p>();
+  vec<chain_p> chains = vNULL;
   unsigned unroll_factor;
   struct tree_niter_desc desc;
   bool unroll = false;
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 7f4d045..d9265db 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -1806,7 +1806,7 @@  rewrite_mem_refs (struct loop *loop, mem_ref_p ref, tree tmp_var)
 {
   unsigned i;
   mem_ref_loc_p loc;
-  vec<mem_ref_loc_p> locs = vec<mem_ref_loc_p>();
+  vec<mem_ref_loc_p> locs = vNULL;
 
   get_all_locs_in_loop (loop, ref, &locs);
   FOR_EACH_VEC_ELT (locs, i, loc)
@@ -2078,7 +2078,7 @@  execute_sm_if_changed_flag_set (struct loop *loop, mem_ref_p ref)
   unsigned i;
   mem_ref_loc_p loc;
   tree flag;
-  vec<mem_ref_loc_p> locs = vec<mem_ref_loc_p>();
+  vec<mem_ref_loc_p> locs = vNULL;
   char *str = get_lsm_tmp_name (ref->mem, ~0);
 
   lsm_tmp_name_add ("_flag");
@@ -2199,7 +2199,7 @@  hoist_memory_references (struct loop *loop, bitmap mem_refs,
 static bool
 ref_always_accessed_p (struct loop *loop, mem_ref_p ref, bool stored_p)
 {
-  vec<mem_ref_loc_p> locs = vec<mem_ref_loc_p>();
+  vec<mem_ref_loc_p> locs = vNULL;
   unsigned i;
   mem_ref_loc_p loc;
   bool ret = false;
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 108c338..dbf643b 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -699,7 +699,7 @@  try_unroll_loop_completely (struct loop *loop,
       sbitmap wont_exit;
       edge e;
       unsigned i;
-      vec<edge> to_remove = vec<edge>();
+      vec<edge> to_remove = vNULL;
       if (ul == UL_SINGLE_ITER)
 	return false;
 
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index e3d2f9c..845c40e 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -1038,7 +1038,7 @@  tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
   unsigned new_est_niter, i, prob;
   unsigned irr = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP;
   sbitmap wont_exit;
-  vec<edge> to_remove = vec<edge>();
+  vec<edge> to_remove = vNULL;
 
   est_niter = expected_loop_iterations (loop);
   determine_exit_conditions (loop, desc, factor,
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 69b94c7..d3007d7 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2996,8 +2996,8 @@  discover_iteration_bound_by_body_walk (struct loop *loop)
 {
   pointer_map_t *bb_bounds;
   struct nb_iter_bound *elt;
-  vec<double_int> bounds = vec<double_int>();
-  vec<bb_queue> queues = vec<bb_queue>();
+  vec<double_int> bounds = vNULL;
+  vec<bb_queue> queues = vNULL;
   bb_queue queue = bb_queue();
   ptrdiff_t queue_index;
   ptrdiff_t latch_index = 0;
@@ -3166,7 +3166,7 @@  maybe_lower_iteration_bound (struct loop *loop)
   pointer_set_t *not_executed_last_iteration = NULL;
   struct nb_iter_bound *elt;
   bool found_exit = false;
-  vec<basic_block> queue = vec<basic_block>();
+  vec<basic_block> queue = vNULL;
   bitmap visited;
 
   /* Collect all statements with interesting (i.e. lower than
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 975c0b6..33cf6ec 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -1541,11 +1541,11 @@  determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
 			   bool no_other_refs)
 {
   struct loop *nest, *aloop;
-  vec<data_reference_p> datarefs = vec<data_reference_p>();
-  vec<ddr_p> dependences = vec<ddr_p>();
+  vec<data_reference_p> datarefs = vNULL;
+  vec<ddr_p> dependences = vNULL;
   struct mem_ref_group *gr;
   struct mem_ref *ref, *refb;
-  vec<loop_p> vloops = vec<loop_p>();
+  vec<loop_p> vloops = vNULL;
   unsigned *loop_data_size;
   unsigned i, j, n;
   unsigned volume, dist, adist;
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index cfaa420..7a41cfe 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -701,7 +701,7 @@  execute_cse_sincos_1 (tree name)
   tree fndecl, res, type;
   gimple def_stmt, use_stmt, stmt;
   int seen_cos = 0, seen_sin = 0, seen_cexpi = 0;
-  vec<gimple> stmts = vec<gimple>();
+  vec<gimple> stmts = vNULL;
   basic_block top_bb = NULL;
   int i;
   bool cfg_changed = false;
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index c81f65c..8a3789d 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -1657,9 +1657,9 @@  cond_if_else_store_replacement (basic_block then_bb, basic_block else_bb,
   then_ddrs.create (1);
   else_ddrs.create (1);
   if (!compute_all_dependences (then_datarefs, &then_ddrs,
-				vec<loop_p>(), false)
+				vNULL, false)
       || !compute_all_dependences (else_datarefs, &else_ddrs,
-				   vec<loop_p>(), false))
+				   vNULL, false))
     {
       free_dependence_relations (then_ddrs);
       free_dependence_relations (else_ddrs);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 00b88bf..1b20a13 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1534,8 +1534,7 @@  phi_translate_1 (pre_expr expr, bitmap_set_t set1, bitmap_set_t set2,
 	vec<vn_reference_op_s> operands = ref->operands;
 	tree vuse = ref->vuse;
 	tree newvuse = vuse;
-	vec<vn_reference_op_s> newoperands
-	    = vec<vn_reference_op_s>();
+	vec<vn_reference_op_s> newoperands = vNULL;
 	bool changed = false, same_valid = true;
 	unsigned int i, j, n;
 	vn_reference_op_t operand;
@@ -3262,7 +3261,7 @@  do_regular_insertion (basic_block block, basic_block dom)
   bool new_stuff = false;
   vec<pre_expr> exprs;
   pre_expr expr;
-  vec<pre_expr> avail = vec<pre_expr>();
+  vec<pre_expr> avail = vNULL;
   int i;
 
   exprs = sorted_array_from_bitmap_set (ANTIC_IN (block));
@@ -3432,7 +3431,7 @@  do_partial_partial_insertion (basic_block block, basic_block dom)
   bool new_stuff = false;
   vec<pre_expr> exprs;
   pre_expr expr;
-  vec<pre_expr> avail = vec<pre_expr>();
+  vec<pre_expr> avail = vNULL;
   int i;
 
   exprs = sorted_array_from_bitmap_set (PA_IN (block));
@@ -3787,8 +3786,7 @@  compute_avail (void)
 	      {
 		vn_reference_t ref;
 		pre_expr result = NULL;
-		vec<vn_reference_op_s> ops
-		    = vec<vn_reference_op_s>();
+		vec<vn_reference_op_s> ops = vNULL;
 
 		/* We can value number only calls to real functions.  */
 		if (gimple_call_internal_p (stmt))
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 73dfa04..2203b66 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -732,7 +732,7 @@  update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
       tree fn = CALL_EXPR_FN (expr);
       unsigned i;
       unsigned nargs = call_expr_nargs (expr);
-      vec<tree> args = vec<tree>();
+      vec<tree> args = vNULL;
       gimple new_stmt;
 
       if (nargs > 0)
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 471b8e6..7318ecf 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -2519,7 +2519,7 @@  maybe_optimize_range_tests (gimple stmt)
   basic_block bb;
   edge_iterator ei;
   edge e;
-  vec<operand_entry_t> ops = vec<operand_entry_t>();
+  vec<operand_entry_t> ops = vNULL;
 
   /* Consider only basic blocks that end with GIMPLE_COND or
      a cast statement satisfying final_range_test_p.  All
@@ -4067,7 +4067,7 @@  reassociate_bb (basic_block bb)
 
 	  if (associative_tree_code (rhs_code))
 	    {
-	      vec<operand_entry_t> ops = vec<operand_entry_t>();
+	      vec<operand_entry_t> ops = vNULL;
 	      tree powi_result = NULL_TREE;
 
 	      /* There may be no immediate uses left by the time we
@@ -4228,7 +4228,7 @@  init_reassoc (void)
 
   free (bbs);
   calculate_dominance_info (CDI_POST_DOMINATORS);
-  plus_negates = vec<tree>();
+  plus_negates = vNULL;
 }
 
 /* Cleanup after the reassociation pass, and print stats if
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index ed89a5a..a7f0f9a 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1027,7 +1027,7 @@  copy_reference_ops_from_call (gimple call,
 static vec<vn_reference_op_s> 
 create_reference_ops_from_ref (tree ref)
 {
-  vec<vn_reference_op_s> result = vec<vn_reference_op_s>();
+  vec<vn_reference_op_s> result = vNULL;
 
   copy_reference_ops_from_ref (ref, &result);
   return result;
@@ -1039,7 +1039,7 @@  create_reference_ops_from_ref (tree ref)
 static vec<vn_reference_op_s> 
 create_reference_ops_from_call (gimple call)
 {
-  vec<vn_reference_op_s> result = vec<vn_reference_op_s>();
+  vec<vn_reference_op_s> result = vNULL;
 
   copy_reference_ops_from_call (call, &result);
   return result;
@@ -1316,7 +1316,7 @@  static vec<vn_reference_op_s>
 valueize_shared_reference_ops_from_ref (tree ref, bool *valueized_anything)
 {
   if (!ref)
-    return vec<vn_reference_op_s>();
+    return vNULL;
   shared_lookup_references.truncate (0);
   copy_reference_ops_from_ref (ref, &shared_lookup_references);
   shared_lookup_references = valueize_refs_1 (shared_lookup_references,
@@ -1332,7 +1332,7 @@  static vec<vn_reference_op_s>
 valueize_shared_reference_ops_from_call (gimple call)
 {
   if (!call)
-    return vec<vn_reference_op_s>();
+    return vNULL;
   shared_lookup_references.truncate (0);
   copy_reference_ops_from_call (call, &shared_lookup_references);
   shared_lookup_references = valueize_refs (shared_lookup_references);
@@ -1452,7 +1452,7 @@  vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
   tree base;
   HOST_WIDE_INT offset, maxsize;
   static vec<vn_reference_op_s>
-    lhs_ops = vec<vn_reference_op_s>();
+    lhs_ops = vNULL;
   ao_ref lhs_ref;
   bool lhs_ref_ok = false;
 
@@ -1658,7 +1658,7 @@  vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
       HOST_WIDE_INT offset2, size2, maxsize2;
       int i, j;
       vec<vn_reference_op_s>
-	  rhs = vec<vn_reference_op_s>();
+	  rhs = vNULL;
       vn_reference_op_t vro;
       ao_ref r;
 
@@ -1715,7 +1715,7 @@  vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
 	  vr->operands.safe_grow (i + 1 + rhs.length ());
 	  if (old == shared_lookup_references
 	      && vr->operands != old)
-	    shared_lookup_references = vec<vn_reference_op_s>();
+	    shared_lookup_references = vNULL;
 	}
       else
 	vr->operands.truncate (i + 1 + rhs.length ());
@@ -2507,7 +2507,7 @@  vn_phi_insert (gimple phi, tree result)
   void **slot;
   vn_phi_t vp1 = (vn_phi_t) pool_alloc (current_info->phis_pool);
   unsigned i;
-  vec<tree> args = vec<tree>();
+  vec<tree> args = vNULL;
 
   /* Canonicalize the SSA_NAME's to their value number.  */
   for (i = 0; i < gimple_phi_num_args (phi); i++)
@@ -3672,7 +3672,7 @@  process_scc (vec<tree> scc)
 static bool
 extract_and_process_scc_for_name (tree name)
 {
-  vec<tree> scc = vec<tree>();
+  vec<tree> scc = vNULL;
   tree x;
 
   /* Found an SCC, pop the components off the SCC stack and
@@ -3721,8 +3721,8 @@  extract_and_process_scc_for_name (tree name)
 static bool
 DFS (tree name)
 {
-  vec<ssa_op_iter> itervec = vec<ssa_op_iter>();
-  vec<tree> namevec = vec<tree>();
+  vec<ssa_op_iter> itervec = vNULL;
+  vec<tree> namevec = vNULL;
   use_operand_p usep = NULL;
   gimple defstmt;
   tree use;
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 787115f..5ff4ce1 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2441,7 +2441,7 @@  eliminate_indirect_cycles (unsigned int node)
       && !bitmap_empty_p (get_varinfo (node)->solution))
     {
       unsigned int i;
-      vec<unsigned> queue = vec<unsigned>();
+      vec<unsigned> queue = vNULL;
       int queuepos;
       unsigned int to = find (graph->indirect_cycles[node]);
       bitmap_iterator bi;
@@ -3337,7 +3337,7 @@  get_constraint_for_1 (tree t, vec<ce_s> *results, bool address_p,
 	    {
 	      unsigned int i;
 	      tree val;
-	      vec<ce_s> tmp = vec<ce_s>();
+	      vec<ce_s> tmp = vNULL;
 	      FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (t), i, val)
 		{
 		  struct constraint_expr *rhsp;
@@ -3437,8 +3437,8 @@  static void
 do_structure_copy (tree lhsop, tree rhsop)
 {
   struct constraint_expr *lhsp, *rhsp;
-  vec<ce_s> lhsc = vec<ce_s>();
-  vec<ce_s> rhsc = vec<ce_s>();
+  vec<ce_s> lhsc = vNULL;
+  vec<ce_s> rhsc = vNULL;
   unsigned j;
 
   get_constraint_for (lhsop, &lhsc);
@@ -3524,7 +3524,7 @@  make_constraints_to (unsigned id, vec<ce_s> rhsc)
 static void
 make_constraint_to (unsigned id, tree op)
 {
-  vec<ce_s> rhsc = vec<ce_s>();
+  vec<ce_s> rhsc = vNULL;
   get_constraint_for_rhs (op, &rhsc);
   make_constraints_to (id, rhsc);
   rhsc.release ();
@@ -3798,7 +3798,7 @@  handle_rhs_call (gimple stmt, vec<ce_s> *results)
       && gimple_call_lhs (stmt) != NULL_TREE
       && TREE_ADDRESSABLE (TREE_TYPE (gimple_call_lhs (stmt))))
     {
-      vec<ce_s> tmpc = vec<ce_s>();
+      vec<ce_s> tmpc = vNULL;
       struct constraint_expr lhsc, *c;
       get_constraint_for_address_of (gimple_call_lhs (stmt), &tmpc);
       lhsc.var = escaped_id;
@@ -3824,7 +3824,7 @@  static void
 handle_lhs_call (gimple stmt, tree lhs, int flags, vec<ce_s> rhsc,
 		 tree fndecl)
 {
-  vec<ce_s> lhsc = vec<ce_s>();
+  vec<ce_s> lhsc = vNULL;
 
   get_constraint_for (lhs, &lhsc);
   /* If the store is to a global decl make sure to
@@ -3909,7 +3909,7 @@  handle_const_call (gimple stmt, vec<ce_s> *results)
   for (k = 0; k < gimple_call_num_args (stmt); ++k)
     {
       tree arg = gimple_call_arg (stmt, k);
-      vec<ce_s> argc = vec<ce_s>();
+      vec<ce_s> argc = vNULL;
       unsigned i;
       struct constraint_expr *argp;
       get_constraint_for_rhs (arg, &argc);
@@ -4010,8 +4010,8 @@  static bool
 find_func_aliases_for_builtin_call (gimple t)
 {
   tree fndecl = gimple_call_fndecl (t);
-  vec<ce_s> lhsc = vec<ce_s>();
-  vec<ce_s> rhsc = vec<ce_s>();
+  vec<ce_s> lhsc = vNULL;
+  vec<ce_s> rhsc = vNULL;
   varinfo_t fi;
 
   if (fndecl != NULL_TREE
@@ -4155,7 +4155,7 @@  find_func_aliases_for_builtin_call (gimple t)
 	if (gimple_call_lhs (t))
 	  {
 	    handle_lhs_call (t, gimple_call_lhs (t), gimple_call_flags (t),
-			     vec<ce_s>(), fndecl);
+			     vNULL, fndecl);
 	    get_constraint_for_ptr_offset (gimple_call_lhs (t),
 					   NULL_TREE, &lhsc);
 	    get_constraint_for_ptr_offset (gimple_call_arg (t, 0),
@@ -4334,8 +4334,8 @@  static void
 find_func_aliases_for_call (gimple t)
 {
   tree fndecl = gimple_call_fndecl (t);
-  vec<ce_s> lhsc = vec<ce_s>();
-  vec<ce_s> rhsc = vec<ce_s>();
+  vec<ce_s> lhsc = vNULL;
+  vec<ce_s> rhsc = vNULL;
   varinfo_t fi;
 
   if (fndecl != NULL_TREE
@@ -4347,7 +4347,7 @@  find_func_aliases_for_call (gimple t)
   if (!in_ipa_mode
       || (fndecl && !fi->is_fn_info))
     {
-      vec<ce_s> rhsc = vec<ce_s>();
+      vec<ce_s> rhsc = vNULL;
       int flags = gimple_call_flags (t);
 
       /* Const functions can return their arguments and addresses
@@ -4404,7 +4404,7 @@  find_func_aliases_for_call (gimple t)
 	      && DECL_RESULT (fndecl)
 	      && DECL_BY_REFERENCE (DECL_RESULT (fndecl)))
 	    {
-	      vec<ce_s> tem = vec<ce_s>();
+	      vec<ce_s> tem = vNULL;
 	      tem.safe_push (rhs);
 	      do_deref (&tem);
 	      rhs = tem[0];
@@ -4453,8 +4453,8 @@  static void
 find_func_aliases (gimple origt)
 {
   gimple t = origt;
-  vec<ce_s> lhsc = vec<ce_s>();
-  vec<ce_s> rhsc = vec<ce_s>();
+  vec<ce_s> lhsc = vNULL;
+  vec<ce_s> rhsc = vNULL;
   struct constraint_expr *c;
   varinfo_t fi;
 
@@ -4536,7 +4536,7 @@  find_func_aliases (gimple origt)
 	  else if (code == COND_EXPR)
 	    {
 	      /* The result is a merge of both COND_EXPR arms.  */
-	      vec<ce_s> tmp = vec<ce_s>();
+	      vec<ce_s> tmp = vNULL;
 	      struct constraint_expr *rhsp;
 	      unsigned i;
 	      get_constraint_for_rhs (gimple_assign_rhs2 (t), &rhsc);
@@ -4552,7 +4552,7 @@  find_func_aliases (gimple origt)
 	  else
 	    {
 	      /* All other operations are merges.  */
-	      vec<ce_s> tmp = vec<ce_s>();
+	      vec<ce_s> tmp = vNULL;
 	      struct constraint_expr *rhsp;
 	      unsigned i, j;
 	      get_constraint_for_rhs (gimple_assign_rhs1 (t), &rhsc);
@@ -4625,7 +4625,7 @@  find_func_aliases (gimple origt)
 	     any global memory.  */
 	  if (op)
 	    {
-	      vec<ce_s> lhsc = vec<ce_s>();
+	      vec<ce_s> lhsc = vNULL;
 	      struct constraint_expr rhsc, *lhsp;
 	      unsigned j;
 	      get_constraint_for (op, &lhsc);
@@ -4669,7 +4669,7 @@  find_func_aliases (gimple origt)
 static void
 process_ipa_clobber (varinfo_t fi, tree ptr)
 {
-  vec<ce_s> ptrc = vec<ce_s>();
+  vec<ce_s> ptrc = vNULL;
   struct constraint_expr *c, lhs;
   unsigned i;
   get_constraint_for_rhs (ptr, &ptrc);
@@ -4687,8 +4687,8 @@  static void
 find_func_clobbers (gimple origt)
 {
   gimple t = origt;
-  vec<ce_s> lhsc = vec<ce_s>();
-  vec<ce_s> rhsc = vec<ce_s>();
+  vec<ce_s> lhsc = vNULL;
+  vec<ce_s> rhsc = vNULL;
   varinfo_t fi;
 
   /* Add constraints for clobbered/used in IPA mode.
@@ -5458,7 +5458,7 @@  create_variable_info_for_1 (tree decl, const char *name)
   varinfo_t vi, newvi;
   tree decl_type = TREE_TYPE (decl);
   tree declsize = DECL_P (decl) ? DECL_SIZE (decl) : TYPE_SIZE (decl_type);
-  vec<fieldoff_s> fieldstack = vec<fieldoff_s>();
+  vec<fieldoff_s> fieldstack = vNULL;
   fieldoff_s *fo;
   unsigned int i;
 
@@ -5609,7 +5609,7 @@  create_variable_info_for (tree decl, const char *name)
 	  if (DECL_INITIAL (decl)
 	      && vnode->analyzed)
 	    {
-	      vec<ce_s> rhsc = vec<ce_s>();
+	      vec<ce_s> rhsc = vNULL;
 	      struct constraint_expr lhs, *rhsp;
 	      unsigned i;
 	      get_constraint_for_rhs (DECL_INITIAL (decl), &rhsc);
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 40c9d44..88c3f26 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -638,7 +638,7 @@  propagate_threaded_block_debug_into (basic_block dest, basic_block src)
       i++;
     }
 
-  vec<tree, va_stack> fewvars = vec<tree, va_stack>();
+  vec<tree, va_stack> fewvars = vNULL;
   pointer_set_t *vars = NULL;
 
   /* If we're already starting with 3/4 of alloc_count, go for a
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index c3b8df8..cdfcd5a 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -424,7 +424,7 @@  find_predicates (vec<use_pred_info_t> **preds,
 {
   size_t num_chains = 0, i;
   vec<edge> *dep_chains = 0;
-  vec<edge> cur_chain = vec<edge>();
+  vec<edge> cur_chain = vNULL;
   bool has_valid_pred = false;
   basic_block cd_root = 0;
 
@@ -525,8 +525,8 @@  find_def_preds (vec<use_pred_info_t> **preds,
 {
   size_t num_chains = 0, i, n;
   vec<edge> *dep_chains = 0;
-  vec<edge> cur_chain = vec<edge>();
-  vec<edge> def_edges = vec<edge>();
+  vec<edge> cur_chain = vNULL;
+  vec<edge> def_edges = vNULL;
   bool has_valid_pred = false;
   basic_block phi_bb, cd_root = 0;
   struct pointer_set_t *visited_phis;
@@ -1633,7 +1633,7 @@  normalize_preds (vec<use_pred_info_t> *preds, size_t *n)
 {
   size_t i, j, ll;
   vec<use_pred_info_t> pred_chain;
-  vec<use_pred_info_t> x = vec<use_pred_info_t>();
+  vec<use_pred_info_t> x = vNULL;
   use_pred_info_t xj = 0, nxj = 0;
 
   if (*n < 2)
@@ -1954,7 +1954,7 @@  execute_late_warn_uninitialized (void)
 {
   basic_block bb;
   gimple_stmt_iterator gsi;
-  vec<gimple> worklist = vec<gimple>();
+  vec<gimple> worklist = vNULL;
   struct pointer_set_t *added_to_worklist;
 
   calculate_dominance_info (CDI_DOMINATORS);
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 8753f4f..121044e 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -47,7 +47,7 @@  along with GCC; see the file COPYING3.  If not see
 static bool
 reachable_at_most_once (basic_block va_arg_bb, basic_block va_start_bb)
 {
-  vec<edge> stack = vec<edge>();
+  vec<edge> stack = vNULL;
   edge e;
   edge_iterator ei;
   sbitmap visited;
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 611b6b9..9eed5e0 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -301,7 +301,7 @@  emit_case_bit_tests (gimple swtch, tree index_expr,
   edge default_edge;
   bool update_dom = dom_info_available_p (CDI_DOMINATORS);
 
-  vec<basic_block> bbs_to_fix_dom = vec<basic_block>();
+  vec<basic_block> bbs_to_fix_dom = vNULL;
 
   tree index_type = TREE_TYPE (index_expr);
   tree unsigned_index_type = unsigned_type_for (index_type);
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 49dd3c0..44fe374 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -792,7 +792,7 @@  vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo,
                                    bb_vec_info bb_vinfo, int *max_vf)
 {
   unsigned int i;
-  vec<ddr_p> ddrs = vec<ddr_p>();
+  vec<ddr_p> ddrs = vNULL;
   struct data_dependence_relation *ddr;
 
   if (dump_enabled_p ())
@@ -3007,7 +3007,7 @@  vect_analyze_data_refs (loop_vec_info loop_vinfo,
 	}
       if (!compute_all_dependences (BB_VINFO_DATAREFS (bb_vinfo),
 				    &BB_VINFO_DDRS (bb_vinfo),
-				    vec<loop_p>(), true))
+				    vNULL, true))
 	{
 	  if (dump_enabled_p ())
 	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, 
@@ -4745,7 +4745,7 @@  void
 vect_transform_grouped_load (gimple stmt, vec<tree> dr_chain, int size,
 			     gimple_stmt_iterator *gsi)
 {
-  vec<tree> result_chain = vec<tree>();
+  vec<tree> result_chain = vNULL;
 
   /* DR_CHAIN contains input data-refs that are a part of the interleaving.
      RESULT_CHAIN is the output of vect_permute_load_chain, it contains permuted
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 6a86c91..04c3760 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -3698,13 +3698,13 @@  vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt,
   bool extract_scalar_result = false;
   gimple use_stmt, orig_stmt, reduction_phi = NULL;
   bool nested_in_vect_loop = false;
-  vec<gimple> new_phis = vec<gimple>();
-  vec<gimple> inner_phis = vec<gimple>();
+  vec<gimple> new_phis = vNULL;
+  vec<gimple> inner_phis = vNULL;
   enum vect_def_type dt = vect_unknown_def_type;
   int j, i;
-  vec<tree> scalar_results = vec<tree>();
+  vec<tree> scalar_results = vNULL;
   unsigned int group_size = 1, k, ratio;
-  vec<tree> vec_initial_defs = vec<tree>();
+  vec<tree> vec_initial_defs = vNULL;
   vec<gimple> phis;
   bool slp_reduc = false;
   tree new_phi_result;
@@ -4575,10 +4575,10 @@  vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
   struct loop * def_stmt_loop, *outer_loop = NULL;
   tree def_arg;
   gimple def_arg_stmt;
-  vec<tree> vec_oprnds0 = vec<tree>();
-  vec<tree> vec_oprnds1 = vec<tree>();
-  vec<tree> vect_defs = vec<tree>();
-  vec<gimple> phis = vec<gimple>();
+  vec<tree> vec_oprnds0 = vNULL;
+  vec<tree> vec_oprnds1 = vNULL;
+  vec<tree> vect_defs = vNULL;
+  vec<gimple> phis = vNULL;
   int vec_num;
   tree def0, def1, tem, op0, op1 = NULL_TREE;
 
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index e6f3da9..a4f537a 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -960,7 +960,7 @@  vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo,
 				   prologue_cost_vec, body_cost_vec))
         {
 	  if (child)
-	    oprnd_info->def_stmts = vec<gimple>();
+	    oprnd_info->def_stmts = vNULL;
 	  vect_free_slp_tree (child);
 	  vect_free_oprnd_info (oprnds_info);
    	  return false;
@@ -1058,7 +1058,7 @@  vect_supported_slp_permutation_p (slp_instance instance)
   slp_tree node = SLP_INSTANCE_LOADS (instance)[0];
   gimple stmt = SLP_TREE_SCALAR_STMTS (node)[0];
   gimple first_load = GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt));
-  vec<slp_tree> sorted_loads = vec<slp_tree>();
+  vec<slp_tree> sorted_loads = vNULL;
   int index;
   slp_tree *tmp_loads = NULL;
   int group_size = SLP_INSTANCE_GROUP_SIZE (instance), i, j;
@@ -1102,7 +1102,7 @@  vect_supported_slp_permutation_p (slp_instance instance)
   SLP_INSTANCE_LOADS (instance) = sorted_loads;
   free (tmp_loads);
 
-  if (!vect_transform_slp_perm_load (stmt, vec<tree>(), NULL,
+  if (!vect_transform_slp_perm_load (stmt, vNULL, NULL,
                                      SLP_INSTANCE_UNROLLING_FACTOR (instance),
                                      instance, true))
     return false;
@@ -1705,8 +1705,8 @@  vect_analyze_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
 {
   unsigned int i;
   vec<gimple> grouped_stores;
-  vec<gimple> reductions = vec<gimple>();
-  vec<gimple> reduc_chains = vec<gimple>();
+  vec<gimple> reductions = vNULL;
+  vec<gimple> reduc_chains = vNULL;
   gimple first_element;
   bool ok = false;
 
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index cfe1275..1e8d7ee 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1722,7 +1722,7 @@  vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
     = {vect_unknown_def_type, vect_unknown_def_type, vect_unknown_def_type};
   gimple new_stmt = NULL;
   int ncopies, j;
-  vec<tree> vargs = vec<tree>();
+  vec<tree> vargs = vNULL;
   enum { NARROW, NONE, WIDEN } modifier;
   size_t i, nargs;
   tree lhs;
@@ -2239,7 +2239,7 @@  vect_create_vectorized_promotion_stmts (vec<tree> *vec_oprnds0,
   int i;
   tree vop0, vop1, new_tmp1, new_tmp2;
   gimple new_stmt1, new_stmt2;
-  vec<tree> vec_tmp = vec<tree>();
+  vec<tree> vec_tmp = vNULL;
 
   vec_tmp.create (vec_oprnds0->length () * 2);
   FOR_EACH_VEC_ELT (*vec_oprnds0, i, vop0)
@@ -2305,13 +2305,13 @@  vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
   int ncopies, i, j;
   tree lhs_type, rhs_type;
   enum { NARROW, NONE, WIDEN } modifier;
-  vec<tree> vec_oprnds0 = vec<tree>();
-  vec<tree> vec_oprnds1 = vec<tree>();
+  vec<tree> vec_oprnds0 = vNULL;
+  vec<tree> vec_oprnds1 = vNULL;
   tree vop0;
   bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
   int multi_step_cvt = 0;
-  vec<tree> vec_dsts = vec<tree>();
-  vec<tree> interm_types = vec<tree>();
+  vec<tree> vec_dsts = vNULL;
+  vec<tree> interm_types = vNULL;
   tree last_oprnd, intermediate_type, cvt_type = NULL_TREE;
   int op_type;
   enum machine_mode rhs_mode;
@@ -2878,7 +2878,7 @@  vectorizable_assignment (gimple stmt, gimple_stmt_iterator *gsi,
   unsigned int nunits = TYPE_VECTOR_SUBPARTS (vectype);
   int ncopies;
   int i, j;
-  vec<tree> vec_oprnds = vec<tree>();
+  vec<tree> vec_oprnds = vNULL;
   tree vop;
   bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
   gimple new_stmt = NULL;
@@ -3087,8 +3087,8 @@  vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi,
   tree op1_vectype;
   int ncopies;
   int j, i;
-  vec<tree> vec_oprnds0 = vec<tree>();
-  vec<tree> vec_oprnds1 = vec<tree>();
+  vec<tree> vec_oprnds0 = vNULL;
+  vec<tree> vec_oprnds1 = vNULL;
   tree vop0, vop1;
   unsigned int k;
   bool scalar_shift_arg = true;
@@ -3465,9 +3465,9 @@  vectorizable_operation (gimple stmt, gimple_stmt_iterator *gsi,
   tree vectype_out;
   int ncopies;
   int j, i;
-  vec<tree> vec_oprnds0 = vec<tree>();
-  vec<tree> vec_oprnds1 = vec<tree>();
-  vec<tree> vec_oprnds2 = vec<tree>();
+  vec<tree> vec_oprnds0 = vNULL;
+  vec<tree> vec_oprnds1 = vNULL;
+  vec<tree> vec_oprnds2 = vNULL;
   tree vop0, vop1, vop2;
   bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
   int vf;
@@ -3820,11 +3820,11 @@  vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
   bool grouped_store = false;
   bool store_lanes_p = false;
   unsigned int group_size, i;
-  vec<tree> dr_chain = vec<tree>();
-  vec<tree> oprnds = vec<tree>();
-  vec<tree> result_chain = vec<tree>();
+  vec<tree> dr_chain = vNULL;
+  vec<tree> oprnds = vNULL;
+  vec<tree> result_chain = vNULL;
   bool inv_p;
-  vec<tree> vec_oprnds = vec<tree>();
+  vec<tree> vec_oprnds = vNULL;
   bool slp = (slp_node != NULL);
   unsigned int vec_num;
   bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
@@ -4337,7 +4337,7 @@  vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
   tree offset = NULL_TREE;
   tree realignment_token = NULL_TREE;
   gimple phi = NULL;
-  vec<tree> dr_chain = vec<tree>();
+  vec<tree> dr_chain = vNULL;
   bool grouped_load = false;
   bool load_lanes_p = false;
   gimple first_stmt;
@@ -5290,10 +5290,10 @@  vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi,
   stmt_vec_info prev_stmt_info = NULL;
   int i, j;
   bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
-  vec<tree> vec_oprnds0 = vec<tree>();
-  vec<tree> vec_oprnds1 = vec<tree>();
-  vec<tree> vec_oprnds2 = vec<tree>();
-  vec<tree> vec_oprnds3 = vec<tree>();
+  vec<tree> vec_oprnds0 = vNULL;
+  vec<tree> vec_oprnds1 = vNULL;
+  vec<tree> vec_oprnds2 = vNULL;
+  vec<tree> vec_oprnds3 = vNULL;
   tree vec_cmp_type = vectype;
 
   if (slp_node || PURE_SLP_STMT (stmt_info))
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index ac8a0b6..471b26c 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -1086,7 +1086,7 @@  gimple_mod_subtract_transform (gimple_stmt_iterator *si)
 }
 
 static vec<cgraph_node_ptr> cgraph_node_map
-    = vec<cgraph_node_ptr>();
+    = vNULL;
 
 /* Initialize map from FUNCDEF_NO to CGRAPH_NODE.  */
 
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3aa58cf..4598cf2 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5718,7 +5718,7 @@  tm_alias_pair_cmp (const void *x, const void *y)
 void
 finish_tm_clone_pairs (void)
 {
-  vec<tm_alias_pair> tm_alias_pairs = vec<tm_alias_pair>();
+  vec<tm_alias_pair> tm_alias_pairs = vNULL;
 
   if (tm_clone_hash == NULL)
     return;
diff --git a/gcc/vec.c b/gcc/vec.c
index 28ca74f..f5f2d11 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -35,6 +35,17 @@  along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "hashtab.h"
 
+/* vNULL is an empty type with a template cast operation that returns
+   a zero-initialized vec<T, A, L> instance.  Use this when you want
+   to assign nil values to new vec instances or pass a nil vector as
+   a function call argument.
+
+   We use this technique because vec<T, A, L> must be PODs (they are
+   stored in unions and passed in vararg functions), this means that
+   they cannot have ctors/dtors.  */
+vnull vNULL;
+
+
 /* Store information about each particular vector.  */
 struct vec_descriptor
 {
diff --git a/gcc/vec.h b/gcc/vec.h
index b8e6270..bfc1811 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -510,6 +510,17 @@  class GTY((user)) vec
 {
 };
 
+/* Type to provide NULL values for vec<T, A, L>.  This is used to
+   provide nil initializers for vec instances.  Since vec must be
+   a POD, we cannot have proper ctor/dtor for it.  To initialize
+   a vec instance, you can assign it the value vNULL.  */
+struct vnull
+{
+  template <typename T, typename A, typename L>
+  operator vec<T, A, L> () { return vec<T, A, L>(); }
+};
+extern vnull vNULL;
+
 
 /* Embeddable vector.  These vectors are suitable to be embedded
    in other data structures so that they can be pre-allocated in a
@@ -1432,7 +1443,7 @@  template<typename T, typename A>
 inline vec<T, A, vl_ptr>
 vec<T, A, vl_ptr>::copy (ALONE_MEM_STAT_DECL) const
 {
-  vec<T, A, vl_ptr> new_vec = vec<T, A, vl_ptr>();
+  vec<T, A, vl_ptr> new_vec = vNULL;
   if (length ())
     new_vec.vec_ = vec_->copy ();
   return new_vec;