tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use DECL_SIZE for field decls.
authorRichard Guenther <rguenther@suse.de>
Tue, 2 Jun 2009 15:33:29 +0000 (15:33 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 2 Jun 2009 15:33:29 +0000 (15:33 +0000)
2009-06-02  Richard Guenther  <rguenther@suse.de>

* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use DECL_SIZE
for field decls.

From-SVN: r148086

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

index 153046d5d04505b5afc912bef62c8cb816fffb69..75c798c2390ecaed9fa61e41974cc4a813c7b6bf 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-02  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use DECL_SIZE
+       for field decls.
+
 2009-06-02  Alexandre Oliva  <aoliva@redhat.com>
 
        * cfgexpand.c (gimple_expand_cfg): Discard the source location
index 4ee4e39afcd243bf454aab55db3e45e225e401b0..3a4415c5759be85df7b0042fbed7401a1fddbce9 100644 (file)
@@ -555,7 +555,7 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
              && integer_zerop (DECL_FIELD_OFFSET (temp.op0))
              && integer_zerop (DECL_FIELD_BIT_OFFSET (temp.op0))
              && host_integerp (TYPE_SIZE (TREE_TYPE (temp.op0)), 0))
-           temp.op0 = TYPE_SIZE (TREE_TYPE (temp.op0));
+           temp.op0 = DECL_SIZE (temp.op0);
          break;
        case ARRAY_RANGE_REF:
        case ARRAY_REF: