diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-08-31 22:46:31 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-08-31 18:46:31 -0400 |
commit | a4e9ffe59171f4ae43e329f0cc1dd919bac27226 (patch) | |
tree | 9be28897beaae19a44d2e62ed16af91e516683e6 /gcc/expr.c | |
parent | 631b67ce1f819a4122eaf8b46f725dc5ff5ebd1d (diff) | |
download | gcc-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/expr.c')
-rw-r--r-- | gcc/expr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5487,7 +5487,7 @@ array_ref_element_size (tree exp) if (TREE_TYPE (aligned_size) != sizetype) aligned_size = fold_convert (sizetype, aligned_size); return size_binop (MULT_EXPR, aligned_size, - size_int (TYPE_ALIGN (elmt_type) / BITS_PER_UNIT)); + size_int (TYPE_ALIGN_UNIT (elmt_type))); } /* Otherwise, take the size from that of the element type. Substitute @@ -6006,9 +6006,9 @@ highest_pow2_factor_for_target (tree target, tree exp) factor = highest_pow2_factor (exp); if (TREE_CODE (target) == COMPONENT_REF) - target_align = DECL_ALIGN (TREE_OPERAND (target, 1)) / BITS_PER_UNIT; + target_align = DECL_ALIGN_UNIT (TREE_OPERAND (target, 1)); else - target_align = TYPE_ALIGN (TREE_TYPE (target)) / BITS_PER_UNIT; + target_align = TYPE_ALIGN_UNIT (TREE_TYPE (target)); return MAX (factor, target_align); } |