From: Richard Henderson Date: Thu, 8 Jul 2004 08:50:00 +0000 (-0700) Subject: tree-ssa-ccp.c (fold_stmt): Get type directly from OBJ_TYPE_REF_OBJECT. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5df6d966d388fc0c7aae3653f72b37a4c4473646;p=gcc.git 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 --- 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) {