2011-02-10 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Feb 2011 15:29:52 +0000 (15:29 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Feb 2011 15:29:52 +0000 (15:29 +0000)
* tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT,
not 8.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170003 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 7b75f48..6094cde 100644 (file)
@@ -1,5 +1,10 @@
 2011-02-10  Richard Guenther  <rguenther@suse.de>
 
+       * tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT,
+       not 8.
+
+2011-02-10  Richard Guenther  <rguenther@suse.de>
+
        PR tree-optimization/47677
        * tree-vrp.c (vrp_bitmap_equal_p): Fix comparison of empty bitmaps.
 
index 97719ff..de17312 100644 (file)
@@ -2941,12 +2941,11 @@ process_constraint (constraint_t t)
 static HOST_WIDE_INT
 bitpos_of_field (const tree fdecl)
 {
-
   if (!host_integerp (DECL_FIELD_OFFSET (fdecl), 0)
       || !host_integerp (DECL_FIELD_BIT_OFFSET (fdecl), 0))
     return -1;
 
-  return (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (fdecl)) * 8
+  return (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (fdecl)) * BITS_PER_UNIT
          + TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (fdecl)));
 }