aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2005-06-09 18:21:36 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2005-06-09 16:21:36 +0000
commit30be951ac7b465e1f10da0f70744364a8e678366 (patch)
tree2fd919060d8ecfb55a3a393c028c7ba1f01c5856 /gcc/tree-inline.c
parent2ffa9a0ce504d59abfa34e2b92d0f3e1aa3f6218 (diff)
downloadgcc-30be951ac7b465e1f10da0f70744364a8e678366.zip
gcc-30be951ac7b465e1f10da0f70744364a8e678366.tar.gz
gcc-30be951ac7b465e1f10da0f70744364a8e678366.tar.bz2
cgraphunit.c (cgraph_create_edges): Do not walk BLOCK; finalize local statics when doing unit-at-a-time.
* cgraphunit.c (cgraph_create_edges): Do not walk BLOCK; finalize local statics when doing unit-at-a-time. (cgraph_varpool_assemble_pending_decls): Output debug info. * dwarf2out.c (decls_for_scope): Skip local statics. (dwarf2out_decl): Handle local statics. * passes.c (rest_of_decl_compilation): Do not differentiate local and global statics in unit-at-a-time. * tree-inline.c (remap_decls): Put local static into unexpanded_vars_list rather than introducing duplicated VAR_DECL node. From-SVN: r100802
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 6d2ef06..db4b1e9 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -385,6 +385,17 @@ remap_decls (tree decls, inline_data *id)
{
tree new_var;
+ /* We can not chain the local static declarations into the unexpanded_var_list
+ as we can't duplicate them or break one decl rule. Go ahead and link
+ them into unexpanded_var_list. */
+ if (!lang_hooks.tree_inlining.auto_var_in_fn_p (old_var, id->callee)
+ && !DECL_EXTERNAL (old_var))
+ {
+ cfun->unexpanded_var_list = tree_cons (NULL_TREE, old_var,
+ cfun->unexpanded_var_list);
+ continue;
+ }
+
/* Remap the variable. */
new_var = remap_decl (old_var, id);