diff options
author | Richard Henderson <rth@redhat.com> | 2004-07-08 01:50:00 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-07-08 08:50:00 +0000 |
commit | 5df6d966d388fc0c7aae3653f72b37a4c4473646 (patch) | |
tree | 8ae017350a8597506e31729d3529fb02694e16a1 | |
parent | bc15d0efe4230e2f3636dc5255c331232211fb44 (diff) | |
download | gcc-5df6d966d388fc0c7aae3653f72b37a4c4473646.zip gcc-5df6d966d388fc0c7aae3653f72b37a4c4473646.tar.gz gcc-5df6d966d388fc0c7aae3653f72b37a4c4473646.tar.bz2 |
tree-ssa-ccp.c (fold_stmt): Get type directly from OBJ_TYPE_REF_OBJECT.
* tree-ssa-ccp.c (fold_stmt): Get type directly from
OBJ_TYPE_REF_OBJECT.
From-SVN: r84280
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-ccp.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa0aefc..0b18c51 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-08 Richard Henderson <rth@redhat.com> + + * tree-ssa-ccp.c (fold_stmt): Get type directly from + OBJ_TYPE_REF_OBJECT. + 2004-07-08 Joseph S. Myers <jsm@polyomino.org.uk> Neil Booth <neil@daikokuya.co.uk> diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 70b91f2..f8b8ab9 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2068,7 +2068,12 @@ fold_stmt (tree *stmt_p) { tree t; - t = TREE_TYPE (TREE_OPERAND (OBJ_TYPE_REF_OBJECT (callee), 0)); + /* ??? Caution: Broken ADDR_EXPR semantics means that + looking at the type of the operand of the addr_expr + can yield an array type. See silly exception in + check_pointer_types_r. */ + + t = TREE_TYPE (TREE_TYPE (OBJ_TYPE_REF_OBJECT (callee))); t = lang_hooks.fold_obj_type_ref (callee, t); if (t) { |