aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-08-31 22:46:31 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-08-31 18:46:31 -0400
commita4e9ffe59171f4ae43e329f0cc1dd919bac27226 (patch)
tree9be28897beaae19a44d2e62ed16af91e516683e6 /gcc/gimplify.c
parent631b67ce1f819a4122eaf8b46f725dc5ff5ebd1d (diff)
downloadgcc-a4e9ffe59171f4ae43e329f0cc1dd919bac27226.zip
gcc-a4e9ffe59171f4ae43e329f0cc1dd919bac27226.tar.gz
gcc-a4e9ffe59171f4ae43e329f0cc1dd919bac27226.tar.bz2
c-common.c (c_alignof_expr): Use DECL_ALIGN_UNIT and TYPE_ALIGN_UNIT.
* c-common.c (c_alignof_expr): Use DECL_ALIGN_UNIT and TYPE_ALIGN_UNIT. (c_sizeof_of_alignof_type): Likewise. * expr.c (array_ref_element_size): Likewise. (highest_pow2_factor_for_target): Likewise. * gimplify.c (canonicalize_addr_expr): Likewise. (gimplify_compound_lval): Likewise. * stor-layout.c (finalize_record_size, finalize_type_size): Likewise. * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise. * varasm.c (assemble_variable): Likewise. (output_constant_def_contents): Alignments are unsigned. From-SVN: r86848
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 2de6cf6..050f97c 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1392,8 +1392,7 @@ canonicalize_addr_expr (tree *expr_p)
TYPE_MIN_VALUE (TYPE_DOMAIN (datype)),
TYPE_MIN_VALUE (TYPE_DOMAIN (datype)),
size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (dctype),
- size_int (TYPE_ALIGN (dctype)
- / BITS_PER_UNIT)));
+ size_int (TYPE_ALIGN_UNIT (dctype))));
*expr_p = build1 (ADDR_EXPR, ctype, *expr_p);
}
@@ -1520,7 +1519,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p,
{
tree elmt_type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));
tree elmt_size = unshare_expr (array_ref_element_size (t));
- tree factor = size_int (TYPE_ALIGN (elmt_type) / BITS_PER_UNIT);
+ tree factor = size_int (TYPE_ALIGN_UNIT (elmt_type));
/* Divide the element size by the alignment of the element
type (above). */