diff options
author | Richard Henderson <rth@redhat.com> | 2004-09-12 19:28:19 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-09-12 19:28:19 -0700 |
commit | 84cce55d0e1acc39d7b5bb44403eb0e1e61fc7b6 (patch) | |
tree | efa4c7cf22e184883607e95aae594bdc7e8b1fa1 /gcc/tree-inline.c | |
parent | 40b7c2f8d2a28381db12d703dc628fda304a1b89 (diff) | |
download | gcc-84cce55d0e1acc39d7b5bb44403eb0e1e61fc7b6.tar.gz |
re PR tree-optimization/10528 (Unexpected loop un-optimization when removing a field of a class)
PR tree-opt/10528
* tree-inline.c (copy_body_r): Recompute bits for ADDR_EXPR,
after copying its argument.
From-SVN: r87423
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 6286f8ab380..82b7857cb1b 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -619,6 +619,16 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data) TREE_OPERAND (*tp, 1) = TREE_OPERAND (*tp, 3); TREE_OPERAND (*tp, 3) = NULL_TREE; } + + /* Variable substitution need not be simple. In particular, the + INDIRECT_REF substitution above. Make sure that TREE_CONSTANT + and friends are up-to-date. */ + else if (TREE_CODE (*tp) == ADDR_EXPR) + { + walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL); + recompute_tree_invarant_for_addr_expr (*tp); + *walk_subtrees = 0; + } } /* Keep iterating. */ |