diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-25 21:36:24 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-25 21:36:24 +0000 |
commit | 2f96475c32ccd16122473fdadc5ab6f1885f5351 (patch) | |
tree | 97fb8429916e88ae81fa00fe312809a322531099 /gcc/tree-nested.c | |
parent | 881e5e0479e2e1bddc1e827a175d5aba18819134 (diff) | |
download | gcc-2f96475c32ccd16122473fdadc5ab6f1885f5351.tar.gz |
* tree-cfg.c (verify_expr, case ADDR_EXPR): Verify invariant,
constant and side_effects of the ADDR_EXPR are consistent.
* tree-nested.c (convert_local_reference): Set CURRENT_FUNCTION_DECL
appropriately around calls to recompute_tree_invarant_for_addr_expr.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 124bbf98cfb..2f9985dcfac 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -871,9 +871,14 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data) if (wi->changed) { + tree save_context; + /* If we changed anything, then TREE_INVARIANT is be wrong, since we're no longer directly referencing a decl. */ + save_context = current_function_decl; + current_function_decl = info->context; recompute_tree_invarant_for_addr_expr (t); + current_function_decl = save_context; /* If the callback converted the address argument in a context where we only accept variables (and min_invariant, presumably), @@ -996,10 +1001,15 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data) /* If we converted anything ... */ if (wi->changed) { + tree save_context; + /* Then the frame decl is now addressable. */ TREE_ADDRESSABLE (info->frame_decl) = 1; + save_context = current_function_decl; + current_function_decl = info->context; recompute_tree_invarant_for_addr_expr (t); + current_function_decl = save_context; /* If we are in a context where we only accept values, then compute the address into a temporary. */ |