diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-13 07:22:04 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-13 07:22:04 +0000 |
| commit | 52a7bd0ee685432e163c9b60c25cedcf7d981d26 (patch) | |
| tree | d8cd3e86855b1ecec0488283f8bc785b5ff92718 /gcc/tree-inline.c | |
| parent | be504f1ea3dbb95aa3b784d426565554cb646a08 (diff) | |
| download | ppe42-gcc-52a7bd0ee685432e163c9b60c25cedcf7d981d26.tar.gz ppe42-gcc-52a7bd0ee685432e163c9b60c25cedcf7d981d26.zip | |
2006-06-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27830
* tree-inline.c (copy_body_r): For copying the operand
of an ADDR_EXPR make sure to fold &* afterwards.
* g++.dg/tree-ssa/pr27830.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114600 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
| -rw-r--r-- | gcc/tree-inline.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 309bb406fb8..3aeb7b61341 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -659,7 +659,12 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data) else if (TREE_CODE (*tp) == ADDR_EXPR) { walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL); - recompute_tree_invariant_for_addr_expr (*tp); + /* Handle the case where we substituted an INDIRECT_REF + into the operand of the ADDR_EXPR. */ + if (TREE_CODE (TREE_OPERAND (*tp, 0)) == INDIRECT_REF) + *tp = TREE_OPERAND (TREE_OPERAND (*tp, 0), 0); + else + recompute_tree_invariant_for_addr_expr (*tp); *walk_subtrees = 0; } } |

