aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-07-08 01:50:00 -0700
committerNathan Sidwell <nathan@gcc.gnu.org>2004-07-08 08:50:00 +0000
commit5df6d966d388fc0c7aae3653f72b37a4c4473646 (patch)
tree8ae017350a8597506e31729d3529fb02694e16a1 /gcc/tree-ssa-ccp.c
parentbc15d0efe4230e2f3636dc5255c331232211fb44 (diff)
downloadgcc-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
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c7
1 files changed, 6 insertions, 1 deletions
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)
{