diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-03-08 20:01:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-03-08 20:01:58 +0000 |
commit | 892f6e652e935a3ea26713d709b7268dd38a5b2e (patch) | |
tree | 102716a11b39cb2289a2ad990b9ef7982fd98ab9 /gcc/ada | |
parent | 49a1fb2d5feaaa6ef109888fd6a08089adcea2ea (diff) | |
download | gcc-892f6e652e935a3ea26713d709b7268dd38a5b2e.zip gcc-892f6e652e935a3ea26713d709b7268dd38a5b2e.tar.gz gcc-892f6e652e935a3ea26713d709b7268dd38a5b2e.tar.bz2 |
decl.c (maybe_pad_type): Use value_factor_p.
* decl.c (maybe_pad_type): Use value_factor_p.
From-SVN: r133039
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/decl.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 904d730..c3c9cad 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 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> + * lang.opt (nostdlib): Move around. * misc.c (gnat_handle_option): Fix formatting. (gnat_dwarf_name): Move around. diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index c75de3f..c0306bd 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -5534,8 +5534,7 @@ maybe_pad_type (tree type, tree size, unsigned int align, with the specified alignment. */ if (!size && INTEGRAL_TYPE_P (type) - && host_integerp (orig_size, 1) - && (TREE_INT_CST_LOW (orig_size) % align) == 0) + && value_factor_p (orig_size, align)) { type = copy_type (type); TYPE_ALIGN (type) = align; @@ -5570,12 +5569,12 @@ maybe_pad_type (tree type, tree size, unsigned int align, if (align != 0 && TREE_CODE (type) == RECORD_TYPE && 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 && (!size || (TREE_CODE (size) == INTEGER_CST && 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); field = create_field_decl (get_identifier ("F"), type, record, 0, |