diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2009-06-05 06:17:51 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2009-06-05 06:17:51 +0000 |
commit | c10348e5af223f2a4be2ace859b8cda39a523e7c (patch) | |
tree | b2ce09ca844dc9b449fab42c7a8e53e9c493be0a /gcc/tree-nested.c | |
parent | d560566ab0860d1111cde7f89362a88649bc7ed1 (diff) | |
download | gcc-c10348e5af223f2a4be2ace859b8cda39a523e7c.tar.gz |
tree-nested.c (finalize_nesting_tree_1): Declare the frame_decl in the binding tree.
* tree-nested.c (finalize_nesting_tree_1): Declare the
frame_decl in the binding tree.
From-SVN: r148198
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index e45f8de2532..df5577091a0 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1,5 +1,5 @@ /* Nested function decomposition for GIMPLE. - Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -2179,10 +2179,26 @@ finalize_nesting_tree_1 (struct nesting_info *root) /* In some cases the frame type will trigger the -Wpadded warning. This is not helpful; suppress it. */ int save_warn_padded = warn_padded; + tree *adjust; + warn_padded = 0; layout_type (root->frame_type); warn_padded = save_warn_padded; layout_decl (root->frame_decl, 0); + + /* Remove root->frame_decl from root->new_local_var_chain, so + that we can declare it also in the lexical blocks, which + helps ensure virtual regs that end up appearing in its RTL + expression get substituted in instantiate_virtual_regs(). */ + for (adjust = &root->new_local_var_chain; + *adjust != root->frame_decl; + adjust = &TREE_CHAIN (*adjust)) + gcc_assert (TREE_CHAIN (*adjust)); + *adjust = TREE_CHAIN (*adjust); + + TREE_CHAIN (root->frame_decl) = NULL_TREE; + declare_vars (root->frame_decl, + gimple_seq_first_stmt (gimple_body (context)), true); } /* If any parameters were referenced non-locally, then we need to |