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
This commit is contained in:
Richard Guenther 2011-02-10 15:29:52 +00:00 committed by Richard Biener
parent 92b1d23b73
commit ea57f5739f
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View 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)));
}