diff options
author | Jan Hubicka <jh@suse.cz> | 2003-09-07 13:15:46 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-09-07 11:15:46 +0000 |
commit | c57e159892e138cdb46977dc063d8a3a9aa91281 (patch) | |
tree | fd15c7c5430310ec2b68a25e39b147312fd57c7b | |
parent | dba65e798f980af13231c931f418d6e35d61eedd (diff) | |
download | gcc-c57e159892e138cdb46977dc063d8a3a9aa91281.zip gcc-c57e159892e138cdb46977dc063d8a3a9aa91281.tar.gz gcc-c57e159892e138cdb46977dc063d8a3a9aa91281.tar.bz2 |
decl2.c (maybe_emit_vtables, [...]): Avoid re-emitting variables in unit-at-a-time mode.
* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
Avoid re-emitting variables in unit-at-a-time mode.
From-SVN: r71167
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1c8fef0..dccc526 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index dfbffa7..e1fe120 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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)) |