]> gcc.gnu.org Git - gcc.git/commitdiff
decl2.c (maybe_emit_vtables, [...]): Avoid re-emitting variables in unit-at-a-time...
authorJan Hubicka <jh@suse.cz>
Sun, 7 Sep 2003 11:15:46 +0000 (13:15 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 7 Sep 2003 11:15:46 +0000 (11:15 +0000)
* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
Avoid re-emitting variables in unit-at-a-time mode.

From-SVN: r71167

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 1c8fef025733c3bcfb72d9e2c48d73b02695937a..dccc52680b2d31bbcb6622c8dc197da5e3c959c1 100644 (file)
@@ -1,3 +1,8 @@
+Sun Sep  7 13:15:14 CEST 2003  Jan Hubicka  <jh@suse.cz>
+
+       * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
+       Avoid re-emitting variables in unit-at-a-time mode.
+
 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/11687
index dfbffa720a0a22d73626bd7ab3049788cd444896..e1fe1209c97993a3219177e61af359250ae0109e 100644 (file)
@@ -1634,7 +1634,9 @@ maybe_emit_vtables (tree ctype)
   /* If the vtables for this class have already been emitted there is
      nothing more to do.  */
   primary_vtbl = CLASSTYPE_VTABLES (ctype);
-  if (TREE_ASM_WRITTEN (primary_vtbl))
+  if (TREE_ASM_WRITTEN (primary_vtbl)
+      || (flag_unit_at_a_time
+         && cgraph_varpool_node (primary_vtbl)->finalized))
     return false;
   /* Ignore dummy vtables made by get_vtable_decl.  */
   if (TREE_TYPE (primary_vtbl) == void_type_node)
@@ -2452,7 +2454,9 @@ write_out_vars (tree vars)
   tree v;
 
   for (v = vars; v; v = TREE_CHAIN (v))
-    if (! TREE_ASM_WRITTEN (TREE_VALUE (v)))
+    if (! TREE_ASM_WRITTEN (TREE_VALUE (v))
+        && (!flag_unit_at_a_time
+           || !cgraph_varpool_node (TREE_VALUE (v))->finalized))
       rest_of_decl_compilation (TREE_VALUE (v), 0, 1, 1);
 }
 
@@ -2875,7 +2879,9 @@ finish_file ()
       for (i = 0; i < pending_statics_used; ++i) 
        {
          tree decl = VARRAY_TREE (pending_statics, i);
-         if (TREE_ASM_WRITTEN (decl))
+         if (TREE_ASM_WRITTEN (decl)
+             || (flag_unit_at_a_time
+                 && cgraph_varpool_node (decl)->finalized))
            continue;
          import_export_decl (decl);
          if (DECL_NOT_REALLY_EXTERN (decl) && ! DECL_IN_AGGR_P (decl))
This page took 0.08343 seconds and 5 git commands to generate.