tree-ssa-ccp.c (fold_stmt): Get type directly from OBJ_TYPE_REF_OBJECT.
authorRichard Henderson <rth@redhat.com>
Thu, 8 Jul 2004 08:50:00 +0000 (01:50 -0700)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 8 Jul 2004 08:50:00 +0000 (08:50 +0000)
* tree-ssa-ccp.c (fold_stmt): Get type directly from
OBJ_TYPE_REF_OBJECT.

From-SVN: r84280

gcc/ChangeLog
gcc/tree-ssa-ccp.c

index fa0aefcc4695edc05ddadcc4f33f993eb7eec2de..0b18c5100cecbea9e486903db1821f717b0b3943 100644 (file)
@@ -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>
 
index 70b91f26520179f36eba86e1e6fa34c75ce09741..f8b8ab90e999462f01af8a43d972f83707a7727c 100644 (file)
@@ -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)
                {