aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
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 012cb7c..e357a25 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;