aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.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/varasm.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/varasm.c')
-rw-r--r--gcc/varasm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 693196e..37996c0 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1643,7 +1643,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
#if !defined(ASM_OUTPUT_ALIGNED_COMMON) && !defined(ASM_OUTPUT_ALIGNED_DECL_COMMON) && !defined(ASM_OUTPUT_ALIGNED_BSS)
- if ((unsigned HOST_WIDE_INT) DECL_ALIGN (decl) / BITS_PER_UNIT > rounded)
+ if ((unsigned HOST_WIDE_INT) DECL_ALIGN_UNIT (decl) > rounded)
warning ("%Jrequested alignment for '%D' is greater than "
"implemented alignment of %d", decl, decl, rounded);
#endif
@@ -1671,10 +1671,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
/* Output the alignment of this data. */
if (align > BITS_PER_UNIT)
- {
- ASM_OUTPUT_ALIGN (asm_out_file,
- floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT));
- }
+ ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (DECL_ALIGN_UNIT (decl)));
/* Do any machine/system dependent processing of the object. */
#ifdef ASM_DECLARE_OBJECT_NAME
@@ -2659,7 +2656,7 @@ output_constant_def_contents (rtx symbol)
int reloc = compute_reloc_for_constant (exp);
/* Align the location counter as required by EXP's data type. */
- int align = TYPE_ALIGN (TREE_TYPE (exp));
+ unsigned int align = TYPE_ALIGN (TREE_TYPE (exp));
#ifdef CONSTANT_ALIGNMENT
align = CONSTANT_ALIGNMENT (exp, align);
#endif