Commit ea57f573 by Richard Guenther Committed by Richard Biener

tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT, not 8.

2011-02-10  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT,
	not 8.

From-SVN: r170003
parent 92b1d23b
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.
......
......@@ -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)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment