diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-16 12:46:21 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-16 12:46:21 +0000 |
commit | 7b7cc58a14ae9e2f194cec0ec7767aceb1ed4be6 (patch) | |
tree | 02bc8e10dd88d80fb926fee0cc4adbd132f00001 | |
parent | 49d8723849491227b1dcfc01d1bb6811501efad0 (diff) | |
download | ppe42-gcc-7b7cc58a14ae9e2f194cec0ec7767aceb1ed4be6.tar.gz ppe42-gcc-7b7cc58a14ae9e2f194cec0ec7767aceb1ed4be6.zip |
* tree.h (BLOCK_CHAIN): Use BLOCK_CHECK.
* optimize.c (remap_block): If we're compiling a clone, pass the
new block to insert_block.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39761 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 25 | ||||
-rw-r--r-- | gcc/tree.h | 2 |
4 files changed, 29 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index abe8ba769b4..6e3517b5fdc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2001-02-16 Jason Merrill <jason@redhat.com> + + * tree.h (BLOCK_CHAIN): Use BLOCK_CHECK. + 2001-02-16 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * .gdbinit: Rename to gdbinit.in. @@ -196,7 +200,7 @@ Tue Feb 13 23:19:27 CET 2001 Jan Hubicka <jh@suse.cz> Tue Feb 13 23:05:42 CET 2001 Jan Hubicka <jh@suse.cz> - * regclass.c (init_reg_sets_1): Silence warning. + * regclass.c (init_reg_sets_1): Silence warning. Tue Feb 13 22:03:07 CET 2001 Jan Hubicka <jh@suse.cz> diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2a8d7a56335..d7149eb759f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-02-16 Jason Merrill <jason@redhat.com> + + * optimize.c (remap_block): If we're compiling a clone, pass the + new block to insert_block. + 2001-02-16 Mark Mitchell <mark@codesourcery.com> * semantics.c (finish_asm_stmt): Robustify. @@ -29,8 +34,8 @@ 2001-02-08 Aldy Hernandez <aldyh@redhat.com> - * cp/parse.y (component_constructor_declarator): allow optional - parenthesess around constructor class name. + * parse.y (component_constructor_declarator): allow optional + parentheses around constructor class name. 2001-02-14 Nathan Sidwell <nathan@codesourcery.com> diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index c6d43b9991f..e18ece97e91 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -161,7 +161,6 @@ remap_block (scope_stmt, decls, id) tree old_block; tree new_block; tree old_var; - tree *first_block; tree fn; /* Make the new block. */ @@ -195,16 +194,24 @@ remap_block (scope_stmt, decls, id) } /* We put the BLOCK_VARS in reverse order; fix that now. */ BLOCK_VARS (new_block) = nreverse (BLOCK_VARS (new_block)); - /* Attach this new block after the DECL_INITIAL block for the - function into which this block is being inlined. In - rest_of_compilation we will straighten out the BLOCK tree. */ fn = VARRAY_TREE (id->fns, 0); - if (DECL_INITIAL (fn)) - first_block = &BLOCK_CHAIN (DECL_INITIAL (fn)); + if (fn == current_function_decl) + /* We're building a clone; DECL_INITIAL is still error_mark_node, and + current_binding_level is the parm binding level. */ + insert_block (new_block); else - first_block = &DECL_INITIAL (fn); - BLOCK_CHAIN (new_block) = *first_block; - *first_block = new_block; + { + /* Attach this new block after the DECL_INITIAL block for the + function into which this block is being inlined. In + rest_of_compilation we will straighten out the BLOCK tree. */ + tree *first_block; + if (DECL_INITIAL (fn)) + first_block = &BLOCK_CHAIN (DECL_INITIAL (fn)); + else + first_block = &DECL_INITIAL (fn); + BLOCK_CHAIN (new_block) = *first_block; + *first_block = new_block; + } /* Remember the remapped block. */ splay_tree_insert (id->decl_map, (splay_tree_key) old_block, diff --git a/gcc/tree.h b/gcc/tree.h index c7745be369b..60427b998b2 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -823,7 +823,7 @@ struct tree_exp #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext) /* Note: when changing this, make sure to find the places that use chainon or nreverse. */ -#define BLOCK_CHAIN(NODE) TREE_CHAIN (NODE) +#define BLOCK_CHAIN(NODE) TREE_CHAIN (BLOCK_CHECK (NODE)) #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin) #define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag) |