decl.c (maybe_pad_type): Use value_factor_p.

* decl.c (maybe_pad_type): Use value_factor_p.

From-SVN: r133039
This commit is contained in:
Eric Botcazou 2008-03-08 20:01:58 +00:00 committed by Eric Botcazou
parent 49a1fb2d5f
commit 892f6e652e
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (maybe_pad_type): Use value_factor_p.
2008-03-08 Eric Botcazou <ebotcazou@adacore.com> 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
* lang.opt (nostdlib): Move around. * lang.opt (nostdlib): Move around.

View File

@ -5534,8 +5534,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
with the specified alignment. */ with the specified alignment. */
if (!size if (!size
&& INTEGRAL_TYPE_P (type) && INTEGRAL_TYPE_P (type)
&& host_integerp (orig_size, 1) && value_factor_p (orig_size, align))
&& (TREE_INT_CST_LOW (orig_size) % align) == 0)
{ {
type = copy_type (type); type = copy_type (type);
TYPE_ALIGN (type) = align; TYPE_ALIGN (type) = align;
@ -5570,12 +5569,12 @@ maybe_pad_type (tree type, tree size, unsigned int align,
if (align != 0 if (align != 0
&& TREE_CODE (type) == RECORD_TYPE && TREE_CODE (type) == RECORD_TYPE
&& TYPE_MODE (type) == BLKmode && TYPE_MODE (type) == BLKmode
&& host_integerp (orig_size, 1) && TREE_CODE (orig_size) == INTEGER_CST
&& compare_tree_int (orig_size, MAX_FIXED_MODE_SIZE) <= 0 && compare_tree_int (orig_size, MAX_FIXED_MODE_SIZE) <= 0
&& (!size && (!size
|| (TREE_CODE (size) == INTEGER_CST || (TREE_CODE (size) == INTEGER_CST
&& compare_tree_int (size, MAX_FIXED_MODE_SIZE) <= 0)) && compare_tree_int (size, MAX_FIXED_MODE_SIZE) <= 0))
&& tree_low_cst (orig_size, 1) % align == 0) && value_factor_p (orig_size, align))
type = make_packable_type (type, true); type = make_packable_type (type, true);
field = create_field_decl (get_identifier ("F"), type, record, 0, field = create_field_decl (get_identifier ("F"), type, record, 0,