re PR lto/47798 (LTO debuginfo for globals wrong)
authorRichard Guenther <rguenther@suse.de>
Fri, 18 Feb 2011 16:24:40 +0000 (16:24 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 18 Feb 2011 16:24:40 +0000 (16:24 +0000)
2011-02-18  Richard Guenther  <rguenther@suse.de>

PR lto/47798
* lto-streamer.h (lto_global_var_decls): Declare.
* lto-streamer-in.c (lto_register_var_decl_in_symtab): Register
statics for global var processing.

lto/
* lto-tree.h (lto_global_var_decls): Do not declare here.
* lto-lang.c: Include lto-streamer.h.
* Make-lang.in (lto-lang.o): Adjust dependencies.

From-SVN: r170274

gcc/ChangeLog
gcc/lto-streamer-in.c
gcc/lto-streamer.h
gcc/lto/ChangeLog
gcc/lto/Make-lang.in
gcc/lto/lto-lang.c
gcc/lto/lto-tree.h

index 724e6edcceb3ab1548a68daf39124a2fc34a188b..3e31b747d3e098fab8269f7d109fb47d16b4a314 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-18  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/47798
+       * lto-streamer.h (lto_global_var_decls): Declare.
+       * lto-streamer-in.c (lto_register_var_decl_in_symtab): Register
+       statics for global var processing.
+
 2011-02-18  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/47737
index ba48cbb3f60ea649b38ab3cf560dbbb467c13086..1f0cf29d35ad0677e18fea11582ff53335f853f0 100644 (file)
@@ -2432,6 +2432,8 @@ lto_register_var_decl_in_symtab (struct data_in *data_in, tree decl)
       ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl));
       SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label));
       rest_of_decl_compilation (decl, 1, 0);
+
+      VEC_safe_push (tree, gc, lto_global_var_decls, decl);
     }
 
   /* If this variable has already been declared, queue the
index b82c54ede1cb91bd65a0243b927aeb98dea785cc..d8669a21529e32b14225e153b56068d48965290f 100644 (file)
@@ -914,6 +914,7 @@ extern void lto_symtab_merge_cgraph_nodes (void);
 extern tree lto_symtab_prevailing_decl (tree decl);
 extern enum ld_plugin_symbol_resolution lto_symtab_get_resolution (tree decl);
 extern void lto_symtab_free (void);
+extern GTY(()) VEC(tree,gc) *lto_global_var_decls;
 
 
 /* In lto-opts.c.  */
index 3872a3584b52a1060feed18e6e1e2dc060ffbdc5..e4267967a37298c300aa884095d53a0249c79fc8 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-18  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/47798
+       * lto-tree.h (lto_global_var_decls): Do not declare here.
+       * lto-lang.c: Include lto-streamer.h.
+       * Make-lang.in (lto-lang.o): Adjust dependencies.
+
 2011-02-10  Kai Tietz  <kai.tietz@onevision.com>
 
        PR lto/47241
index 16b0f35e2adba7879c6b948253d300e60695d961..22e13912e328ef77b0317bcdca823856360c5e3e 100644 (file)
@@ -79,7 +79,7 @@ $(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS)
 lto/lto-lang.o: lto/lto-lang.c $(CONFIG_H) coretypes.h debug.h \
        flags.h $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(SYSTEM_H) \
        $(TARGET_H) $(LTO_H) $(GIMPLE_H) gtype-lto.h gt-lto-lto-lang.h \
-       $(EXPR_H)
+       $(EXPR_H) lto-streamer.h
 lto/lto.o: lto/lto.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(OPTS_H) \
        toplev.h $(TREE_H) $(DIAGNOSTIC_CORE_H) $(TM_H) \
        $(CGRAPH_H) $(GGC_H) tree-ssa-operands.h $(TREE_PASS_H) \
index 968073ba4ef3048dbd760a44f12b86ed6b8d8eb7..5f157d6de06cb8dc23486414889215382780ba0b 100644 (file)
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "diagnostic-core.h"
 #include "toplev.h"
+#include "lto-streamer.h"
 
 static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *);
 static tree handle_leaf_attribute (tree *, tree, tree, int, bool *);
index bc77750352d9165e208721c2f16935922186c09a..d187fe20dd3be10475ed190b4c14d8d1cf35691d 100644 (file)
@@ -55,7 +55,4 @@ union GTY((desc ("lto_tree_node_structure (&%h)"),
                        desc ("tree_node_structure (&%h)"))) generic;
 };
 
-/* Vector to keep track of external variables we've seen so far.  */
-extern GTY(()) VEC(tree,gc) *lto_global_var_decls;
-
 #endif /* GCC_LTO_TREE_H */