From: Olivier Hainque Date: Thu, 19 Feb 2004 07:52:51 +0000 (+0100) Subject: expr.c (is_aligning_offset): Check if we are aligning the expressions's address over... X-Git-Tag: releases/gcc-4.0.0~10013 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0cfc6913eda8fe934043848ee7c9462464f75f1;p=thirdparty%2Fgcc.git expr.c (is_aligning_offset): Check if we are aligning the expressions's address over BIGGEST_ALIGNMENT in... * expr.c (is_aligning_offset): Check if we are aligning the expressions's address over BIGGEST_ALIGNMENT in bytes, not in bits. From-SVN: r78076 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb59a5e47e94..4f58b58d1987 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-02-19 Olivier Hainque + + * expr.c (is_aligning_offset): Check if we are aligning the + expressions's address over BIGGEST_ALIGNMENT in bytes, not + in bits. + 2003-02-18 Matt Austern * gcc.c (LIBGCC_SPEC): If REAL_LIBGCC_SPEC is defined, and diff --git a/gcc/expr.c b/gcc/expr.c index 223a36b0136f..907d30c4006e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9088,7 +9088,8 @@ is_aligning_offset (tree offset, tree exp) power of 2 and which is larger than BIGGEST_ALIGNMENT. */ if (TREE_CODE (offset) != BIT_AND_EXPR || !host_integerp (TREE_OPERAND (offset, 1), 1) - || compare_tree_int (TREE_OPERAND (offset, 1), BIGGEST_ALIGNMENT) <= 0 + || compare_tree_int (TREE_OPERAND (offset, 1), + BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0 || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0) return 0;