From a577c4054fc7aa9a5228feb6f0bdb37cf31997d5 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 15 Jun 2011 11:28:13 +0000 Subject: [PATCH] expr.c (expand_expr_real_2): Reduce all integral types to bitfield precision. 2011-06-15 Richard Guenther * expr.c (expand_expr_real_2): Reduce all integral types to bitfield precision. (expand_expr_real_1): Likewise. From-SVN: r175078 --- gcc/ChangeLog | 6 ++++++ gcc/expr.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 959edbb8c11..d52725cadf8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-15 Richard Guenther + + * expr.c (expand_expr_real_2): Reduce all integral types to + bitfield precision. + (expand_expr_real_1): Likewise. + 2011-06-15 Martin Jambor PR tree-optimization/48613 diff --git a/gcc/expr.c b/gcc/expr.c index c4bba281cd8..9535c967168 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7265,7 +7265,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, /* An operation in what may be a bit-field type needs the result to be reduced to the precision of the bit-field type, which is narrower than that of the type's mode. */ - reduce_bit_field = (TREE_CODE (type) == INTEGER_TYPE + reduce_bit_field = (INTEGRAL_TYPE_P (type) && GET_MODE_PRECISION (mode) > TYPE_PRECISION (type)); if (reduce_bit_field && modifier == EXPAND_STACK_PARM) @@ -8334,7 +8334,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, result to be reduced to the precision of the bit-field type, which is narrower than that of the type's mode. */ reduce_bit_field = (!ignore - && TREE_CODE (type) == INTEGER_TYPE + && INTEGRAL_TYPE_P (type) && GET_MODE_PRECISION (mode) > TYPE_PRECISION (type)); /* If we are going to ignore this result, we need only do something -- 2.30.2