diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-19 17:24:46 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-19 17:24:46 +0000 |
commit | c7ad00ba0a974d85088e49e33d4f55b4350212e8 (patch) | |
tree | f19d2e20ee8123aed347debb17ed4b5e94b0966a /gcc/tree.c | |
parent | 25c5b094821269742864f1c92734e6f079d3ccfd (diff) | |
download | gcc-c7ad00ba0a974d85088e49e33d4f55b4350212e8.tar.gz |
PR middle-end/17885
* tree.c (recompute_tree_invarant_for_addr_expr): Always poll address
of INDIRECT_REF.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 26b5f1b39ad..e07bd479908 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2311,16 +2311,13 @@ do { tree _node = (NODE); \ } /* Now see what's inside. If it's an INDIRECT_REF, copy our properties from - it. If it's a decl, it's invariant and constant if the decl is static. - It's also invariant if it's a decl in the current function. (Taking the - address of a volatile variable is not volatile.) If it's a constant, - the address is both invariant and constant. Otherwise it's neither. */ + the address, since &(*a)->b is a form of addition. If it's a decl, it's + invariant and constant if the decl is static. It's also invariant if it's + a decl in the current function. Taking the address of a volatile variable + is not volatile. If it's a constant, the address is both invariant and + constant. Otherwise it's neither. */ if (TREE_CODE (node) == INDIRECT_REF) - { - /* If this is &((T*)0)->field, then this is a form of addition. */ - if (TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST) - UPDATE_TITCSE (node); - } + UPDATE_TITCSE (TREE_OPERAND (node, 0)); else if (DECL_P (node)) { if (staticp (node)) |