aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-09-09 00:47:05 +0000
committerRichard Henderson <rth@redhat.com>2005-09-09 00:47:05 +0000
commit8fa240d8f18457ae22e2a5841b577ef7d2bfdd87 (patch)
tree8b288d10d2c8cf110317fdcfab54fc70ab7a2ec6 /gcc/cgraphunit.c
parent9112af83c145726e924de9a45ae7dacd6b57907e (diff)
PR debug/23190
* toplev.c (wrapup_global_declaration_1): Split out ... (wrapup_global_declaration_2): ... from ... (wrapup_global_declarations): ... here. Return bool. (check_global_declaration_1): Split out ... (check_global_declarations): from here. (emit_debug_global_declarations): New. * toplev.h (wrapup_global_declaration_1, wrapup_global_declaration_2, check_global_declaration_1, emit_debug_global_declarations): Declare. * c-decl.c (c_write_global_declarations_1): Don't create a vector of decls. Call wrapup_global_declaration_1, wrapup_global_declaration_2, check_global_declaration_1 directly. (c_write_global_declarations_2): New. (ext_block): New. (c_write_global_declarations): Call c_write_global_declarations_2. * langhooks.c (write_global_declarations): Call emit_debug_global_declarations. * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Don't remove decls that have DECL_RTL_SET_P. * passes.c (rest_of_decl_compilation): Invoke cgraph_varpool_finalize_decl for all but functions. cp/ * decl.c (wrapup_globals_for_namespace): Call emit_debug_global_declarations. * decl2.c (cp_finish_file): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@104065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 012cb7c2308..e357a25d9e4 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -311,7 +311,13 @@ cgraph_varpool_remove_unreferenced_decls (void)
&& ((DECL_ASSEMBLER_NAME_SET_P (decl)
&& TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
|| node->force_output
- || decide_is_variable_needed (node, decl)))
+ || decide_is_variable_needed (node, decl)
+ /* ??? Cgraph does not yet rule the world with an iron hand,
+ and does not control the emission of debug information.
+ After a variable has its DECL_RTL set, we must assume that
+ it may be referenced by the debug information, and we can
+ no longer elide it. */
+ || DECL_RTL_SET_P (decl)))
cgraph_varpool_mark_needed_node (node);
node = next;