From 5df6d966d388fc0c7aae3653f72b37a4c4473646 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 8 Jul 2004 01:50:00 -0700 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-ccp.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa0aefcc469..0b18c5100ce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-08 Richard Henderson + + * tree-ssa-ccp.c (fold_stmt): Get type directly from + OBJ_TYPE_REF_OBJECT. + 2004-07-08 Joseph S. Myers Neil Booth diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 70b91f26520..f8b8ab90e99 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) { -- 2.30.2