OSDN Git Service

* lto.c (lto_fixup_decls): Remove global var decls freeing here.
[pf3gnuchains/gcc-fork.git] / gcc / lto / lto.c
index 9f6ad40..a2a2b68 100644 (file)
@@ -1454,8 +1454,6 @@ lto_fixup_decls (struct lto_file_decl_data **files)
        VEC_replace (tree, lto_global_var_decls, i, decl);
     }
 
-  VEC_free (tree, gc, lto_global_var_decls);
-  lto_global_var_decls = NULL;
   pointer_set_destroy (seen);
 }
 
@@ -1710,6 +1708,9 @@ materialize_cgraph (void)
   for (i = 0; VEC_iterate (tree, lto_global_var_decls, i, decl); i++)
     rest_of_decl_compilation (decl, 1, 0);
 
+  VEC_free (tree, gc, lto_global_var_decls);
+  lto_global_var_decls = NULL;
+
   if (!quiet_flag)
     fprintf (stderr, "\n");