diff options
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r-- | gcc/varpool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c index 4149c1d1d21..2e77f62c59e 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see #include "output.h" #include "tree-gimple.h" #include "tree-flow.h" +#include "flags.h" /* This file contains basic routines manipulating variable pool. @@ -226,6 +227,9 @@ decide_is_variable_needed (struct varpool_node *node, tree decl) && lookup_attribute ("used", DECL_ATTRIBUTES (decl))) return true; + if (in_lto_p) + return true; + /* ??? If the assembler name is set by hand, it is possible to assemble the name later after finalizing the function and the fact is noticed in assemble_name then. This is arguably a bug. */ |